Unix Questions On Commands
Unix Questions On Commands
Unix Questions On Commands
com/CareerMag/
Unix Commands Interview Questions Subscribe to FREE & Exclusive career resources at www.jobsassist.com/CareerMag/
4. What does the command $who | sort logfile > newfile do?
The input from a pipe can be combined with the input from a file . The trick is to use the special symbol -
(a hyphen) for those commands that recognize the hyphen as std input.
In the above command the output from who becomes the std input to sort , meanwhile sort opens the file
logfile, the contents of this file is sorted together with the output of who (rep by the hyphen) and the sorted
output is redirected to the file newfile.
6. Which of the following commands is not a filter man , (b) cat , (c) pg , (d) head
Ans: man
A filter is a program which can receive a flow of data from std input, process (or filter) it and send the result
to the std output.
Unix Commands Interview Questions Subscribe to FREE & Exclusive career resources at www.jobsassist.com/CareerMag/
7. How is the command $cat file2 different from $cat >file2 and >> redirection operators ?
is the output redirection operator when used it overwrites while >> operator appends into the file.
14. Which command is used to delete all files in the current directory and all its sub-directories?
rm -r *
JobsAssist.com (http://www.jobsassist.com/) and VyomWorld.com (http://www.vyomworld.com/) Free Student Resources
Unix Commands Interview Questions Subscribe to FREE & Exclusive career resources at www.jobsassist.com/CareerMag/
24. How does the kernel differentiate device files and ordinary files?
JobsAssist.com (http://www.jobsassist.com/) and VyomWorld.com (http://www.vyomworld.com/) Free Student Resources
Unix Commands Interview Questions Subscribe to FREE & Exclusive career resources at www.jobsassist.com/CareerMag/
Unix Commands Interview Questions Subscribe to FREE & Exclusive career resources at www.jobsassist.com/CareerMag/
Unix Commands Interview Questions Subscribe to FREE & Exclusive career resources at www.jobsassist.com/CareerMag/