View Single Post
danramos's Avatar
Posts: 4,672 | Thanked: 5,455 times | Joined on Jul 2008 @ Springfield, MA, USA
#29
Originally Posted by danramos View Post
Just do you understand each part...

rootsh is telling the system to run the following as the root user (i.e. full control)
grep is a command that looks for expressions and prints them (literally: g/re/p ...get.. regular expression.. and print)
-A 13 is a flag telling grep to match something and also print the next 13 lines after whatever matches
lock_code is literally the phrase (the expression) we're looking for
/dev/mtd1 is the filename we're going to search through (in this case, a filehandle for Memory Technology Device subsystem number one in Linux)
| is a pipe that takes the output from the commands on the left and feeds it as input to the commands on the right
tail is a command that prints the last few lines of input
-1 is a flag telling the tail command to just print one line (the last line only)

I figured it might help to understand what it's doing to help get the command right.
One correction... the g in grep stands for 'globally match'... but 'get' made better sense as an explanation. Just couldn't help correcting it.

Take care!
__________________
Nokia's slogan shouldn't be the pedo-palmgrabbing image with the slogan, "Connecting People"... It should be one hand open pleadingly with another hand giving the middle finger and the more apt slogan, "Potential Unrealized." --DR