- World's Largest Collection of Interview Questions & Answers, FAQs, queries, sample papers, exam papers, dumps, what, why, how, where, when questions
Our Services
Get 9,000 Interview Questions & Answers in an eBook.

Get it now !!
Send your Resume to 6000 Companies
Unix Commands Interview Questions & Answers - Learning Mode

Unix Commands Interview Questions & Answers - Learning Mode

There are thousands of commands available on a typical unix box. In bash, just hit the "Tab" key twice and say yes, to display the the commands currently available on your machine. A standard unix operating system lists currently thousands of commands. Type x to list all commands starting with x.

Try Unix Commands Interview Questions & Answers - Exam Mode

1 2 3 Next

Sort By : Latest First | Oldest First | By Rating

Unix Commands Interview Questions & Answers - Learning Mode
Try Unix Commands Interview Questions & Answers - Exam Mode
Question: What difference between cmp and diff commands?

Answer: cmp - Compares two files byte by byte and displays the first mismatch
diff - tells the changes to be made to make the files identical Source:
Question: Using the commands ps, cut, tr and kill, along with pipes, write a command that will find all sleep processes running on the system and kill them?

Answer: ps: check process status
Syntax: ps ?option
e: list all currently running processes (A for Linux)
f: gives full listing (give ancestry for Linux)
l: gives long listing
u username: list processes for the user only
S: sleeping
O: running
R: on run queue
Z: zombie (parent didn?t wait for death of its child
T: stopped or suspended

Question: Is it possible to create new a file system in UNIX?

Answer: Yes, ?mkfs? is used to create a new file system. Source:
Question: Difference Between Grep and Find command ?

Answer: Find command is used to search for a file with a specific file name in a set of files.
Syntax: find .-name "fileE" -print

grep command is used to search pattren within a file.
Syntax: grep "pattren" filename Source:
Question: Is it possible to restrict incoming message?

Answer: Yes, using the ?mesg? command. Source:
Question: What is the use of the command "ls -x chapter[1-5]"

Answer: ls stands for list; so it displays the list of the files that starts with 'chapter' with suffix '1' to '5', chapter1, chapter2, and so on. Source:
Question: Explain about lpr filename?

Answer: This command is used to print a file. If you want to change the default print you can change the printer by using the P option. For double sided print you can use lpr-Pvalkyr-d. This is very useful command in UNIX present in many packages. Source:
Question: Is ?du? a command? If so, what is its use?

Answer: Yes, it stands for ?disk usage?. With the help of this command you can find the disk capacity and free space of the disk. Source:
Question: Which of the following commands is not a filter
man , (b) cat , (c) pg , (d) head

Answer: 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. Source:
Question: What is the use of ?grep? command?

Answer: ?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 Source:
Question: How many prompts are available in a UNIX system?

Answer: Two prompts, PS1 (Primary Prompt), PS2 (Secondary Prompt). Source:
Question: Brief about the command nn?

Answer: This command allows you to read the news. First you can read about the local news and then the remote news. "nnl? command makes or allows you to read local news and nnr command is used to read remote news. Manual and help information is available with many popular packages. Source:
Question: Explain about the command lynx?

Answer: This command helps you to browse web from an ordinary terminal. Text can be seen but not the pictures. URL can be assigned as an argument to the G command. Help section can be obtained by pressing H and Q makes the program to quit. Source:
Question: Which command is used to delete all files in the current directory and all its sub-directories?

Answer: rm -r * Source:
Question: What is the difference between cat and more command?

Answer: 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. Source:
Question: Brief about the command ff?

Answer: This command finds files present anywhere on the system. This command is used to find document location where you forgot the directory in which you kept the file but you do remember about the name. This command is not restricted in finding files it displays files and documents relevant to the name. Source:
Question: Name the data structure used to maintain file identification?

Answer: ?inode?, each file has a separate inode and a unique inode number. Source:
Question: Construct pipes to execute the following jobs.

Answer: 1. Output of who should be displayed on the screen with value of total number of users who have logged in displayed at the bottom of the list.
2. Output of ls should be displayed on the screen and from this output the lines containing the word ?poem? should be counted and the count should be stored in a file.
3. Contents of file1 and file2 should be displayed on the screen and this output should be appended in a file. From output of ls the lines containing ?poem? should be displayed on the Source:
Question: What will the following command do?

Answer: $ echo *
It is similar to 'ls' command and displays all the files in the current
directory. Source:
Question: How is the command ?$cat file2 ? different from ?$cat >file2 and >> redirection operators ?

Answer: is the output redirection operator when used it overwrites while >> operator appends into the file. Source:

1 2 3 Next

India News Network
Latest 20 Questions
Payment of time- barred debt is: (a) Valid (b) Void (c) Illegal (d) Voidable
Consideration is defined in the Indian Contract Act,1872 in: (a) Section 2(f) (b) Section 2(e) (c) Section 2(g) (d) Section 2(d)
Which of the following is not an exception to the rule, "No consideration, No contract": (a) Natural love and affection (b) Compensation for involuntary services (c) Completed gift (d) Agency
Consideration must move at the desire of: (a) The promisor (b) The promisee (c) The promisor or any other party (d) Both the promisor and the promisee
An offer which is open for acceptance over a period of time is: (a) Cross Offer (b) Counter Offer (c) Standing Offer (d) Implied Offer
Specific offer can be communicated to__________ (a) All the parties of contract (b) General public in universe (c) Specific person (d) None of the above
_________ amounts to rejection of the original offer. (a) Cross offer (b) Special offer (c) Standing offer (d) Counter offer
A advertises to sell his old car by advertising in a newspaper. This offer is caleed: (a) General Offer (b) Special Offer (c) Continuing Offer (d) None of the above
In case a counter offer is made, the original offer stands: (a) Rejected (b) Accepted automatically (c) Accepted subject to certain modifications and variations (d) None of the above
In case of unenforceable contract having some technical defect, parties (a) Can sue upon it (b) Cannot sue upon it (c) Should consider it to be illegal (d) None of the above
If entire specified goods is perished before entering into contract of sale, the contract is (a) Valid (b) Void (c) Voidable (d) Cancelled
______________ contracts are also caled contracts with executed consideration. (a) Unilateral (b) Completed (c) Bilateral (d) Executory
A offers B to supply books @ Rs 100 each but B accepts the same with condition of 10% discount. This is a case of (a) Counter Offer (b) Cross Offer (c) Specific Offer (d) General Offer
_____________ is a game of chance. (a) Conditional Contract (b) Contingent Contract (c) Wagering Contract (d) Quasi Contract
There is no binding contract in case of _______ as one's offer cannot be constructed as acceptance (a) Cross Offer (b) Standing Offer (c) Counter Offer (d) Special Offer
An offer is made with an intention to have negotiation from other party. This type of offer is: (a) Invitation to offer (b) Valid offer (c) Voidable (d) None of the above
When an offer is made to the world at large, it is ____________ offer. (a) Counter (b) Special (c) General (d) None of the above
Implied contract even if not in writing or express words is perfectly _______________ if all the conditions are satisfied:- (a) Void (b) Voidable (c) Valid (d) Illegal
A specific offer can be accepted by ___________. (a) Any person (b) Any friend to offeror (c) The person to whom it is made (d) Any friend of offeree
An agreement toput a fire on a person's car is a ______: (a) Legal (b) Voidable (c) Valid (d) Illegal
Cache = 0.4375 Seconds