Prepare for your Next Interview
This is a discussion on Unix command meanings within the Unix/Linux forums, part of the Operating Systems category; What is the meaning of these commands in Unix : unset VAR man ls | grep time ls -lR | grep dvi Any body can explain the above Unix statements...
|
|||
|
Re: Unix command meanings
1> unset VAR
VAR is an environmental variable containing some value, which has been set up in this example. Using this command, "unset VAR", the variable will unloaded from the environmental list of variables and will therefore loose the value. It will not available for further reference after the command has been issued. 2> man ls | grep time this composite command can be split up into 3 parts, 1> man ls - man will list the manual page for the command "ls" 2> | ( pipe symbol ) - Usage of this pipe symbol will redirect the output of "man ls" command to the next command which is "grep time". 3> grep time - grep (global regular expression print) will search for the particular string "time" in the output of "man ls". Pipe symbol connects the output of the first command with the 2nd, thereby in this example, the composite command searches for the string time in the manual page of command "ls". 3> ls -lR | grep dvi 3 parts again 1> ls -lR -> list the contents of the current directory and its subdirectories ( R option ) using the long listing format ( l option ). 2> | - connect 1st and 2nd 3> grep dvi - search for "dvi" string Effectively, this means search for the file named dvi in the current directory and its sub-directories. |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Options in ps command in UNIX | blenda | Unix/Linux | 7 | 03-07-2007 12:03 PM |
| Can you tell the command | christia | Unix/Linux | 1 | 09-09-2006 05:00 PM |
| Brief Idea on the UNIX command | StephenRaj | Unix/Linux | 1 | 09-09-2006 04:13 PM |
| Query with a Command in UNIX operating system | RyanJames | Unix/Linux | 2 | 07-23-2006 12:39 PM |
| Trapped with Trap command in UNIX | blenda | Unix/Linux | 0 | 07-12-2006 04:57 PM |