Thursday, May 25, 2006

Unix Commands Interview Questions

What is the use of ‘grep’ command?

‘grep’ is a pattern search command. It searches for the pattern, specified in the command line with appropriate option, in a file(s).
Syntax : grep
Example : grep 99mx mcafile


What is the difference between cat and more command?

Cat displays file contents. If the file is large the contents scroll off the screen before we view it. So command 'more' is like a pager which displays the contents page by page.


Write a command to kill the last background job?

Kill $!


More ......

No comments: