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

Q 1 - What is the file descriptor number which represents the STDOUT?

A - 0

B - 1

C - 2

D - None of the above.

Answer : B

Explanation

0-STDIN, 1-STDOUT & 2-STDERR

Q 2 - She-bang line in a shell script begins with__

A - #

B - #!

C - !#

D - None of the above.

Answer : B

Explanation

It tell the system to use which shell for executing the script file.

Q 3 - Choose the correct from below to search for lines beginning with the pattern using grep.

A - ^pattern

B - pattern^

C - $pattern

D - pattern$

Answer : A

Explanation

The pattern can be enclosed in single quotes to suppress meaning of all the meta-characters special meanings.

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 character is used to search a pattern in the forward direction in vi editor?

A - //

B - :/

C - ?

D - /

Answer : D

Explanation

Answer : A

Explanation

Q 7 - Command to display in the format dd/mm/yy

A - date '+%d/%m/%Y'

B - date '+%d/%m/%y'

C - date '+%m/%d/%y'

D - date '+INDIA'

Answer : B

Explanation

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

Q 9 - Mount point for templorary removable devices is ___

A - /

B - /mnt

C - /dev

D - /tmp

Answer : B

Explanation

Q 10 - What is the PID of the process init

A - S

B - 1

C - 0

D - 8

Answer : B

Explanation

unix_questions_answers.htm
Advertisements