Unix / Linux Online Quiz



Following quiz provides Multiple Choice Questions (MCQs) related to Unix Framework. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can use Next Quiz button to check new set of questions in the quiz.

Questions and Answers

Answer : C

Explanation

The parent process id of a child process.

Q 2 - Which shell variable holds the first command line argument for a shell script?

A - $0

B - $1

C - #0

D - None of the above

Answer : B

Explanation

$0 represent the shell script file name itself. Starting with $1, are actual command line arguments sent to the shell script.

Q 3 - Which command can be used to remove a non-empty directory?

A - rmdir

B - rd

C - ddir

D - rm

Answer : D

Explanation

rmdir can be used only if the directory is empty. We can remove the directory if non-empty using recursive option with ‘rm’, as a directory is even a file for UNIX/Linux.

Q 4 - Choose option to list files by modification time.

A - ls –mt

B - ls –t

C - ls –a

D - ls –l

Answer : B

Explanation

–t is to sort by modification time.

Q 5 - Which option can be used with ‘chmod’ to apply permission bits recursively on all the files.

A - –r

B - -R

C - –l

D - -f

Answer : B

Explanation

Q 6 - Which command can be used to restrict the messages to be written onto you terminal using write command?

A - mesg

B - stop

C - dodge

D - halt

Answer : A

Explanation

You can turn off messages by executing the command – mesg with ‘n’ as argument.

Q 7 - Which command is used to copy file across different system?

A - rcp

B - ftp

C - mcp

D - ncp

Answer : B

Explanation

ftp is the utility available in many platforms which gives the provision of copying files across different system.

Q 8 - Which command is used to get intermediate result in a pipeline of commands?

A - tee

B - tea

C - get

D - filter

Answer : A

Explanation

Answer : C

Explanation

Oracle Corporation took over Sun microsystems

Q 10 - Choose the example for character special file.

A - Floppy disk

B - Mouse

C - Memory

D - Flash drive

Answer : B

Explanation

unix_questions_answers.htm
Advertisements