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 option to create hard link for a directory?

A - s

B - l

C - f

D - None of the above.

Answer : D

Explanation

It is error to create a hard link for a directory.

Q 2 - Let a = 5, b = 6. Choose the proper command to perform multiplication?

A - expr $a * $b

B - expr $a \* $b

C - $(a*b)

D - None of the above.

Answer : B

Explanation

As * hold special meaning suppress it by escaping with \.

Q 3 - Choose the option to remove write permission for group & others for a file a.txt.

A - Select disable write for group and others where file=a.txt

B - chmod go-w a.txt

C - chmod w-go a.txt

D - chmod go=r-x a.txt

Answer : B

Explanation

Q 4 - Which option can be used with rm command to prompt for file removal?

A - ask

B - i

C - -c

D - -n

Answer : B

Explanation

By default rm is non interactive. i means as interactive.

Q 5 - Choose the correct usage of cd to move into parent directory.

A - cd

B - cd..

C - cd/

D - None of the above

Answer : D

Explanation

cd ..(space between cd and ..) is correct instead of cd..

Q 6 - Choose the command which can display only your information.

A - who

B - who am i

C - whoisme

D - None of the above.

Answer : B

Explanation

Q 7 - How can you execute date command staying within vi editor?

A - !date

B - :!date

C - :>date

D - Noe of the above

Answer : B

Explanation

Staying in command mode of vi, hit : and any command following exclamation (!).

Q 8 - Which command from the following can create a file if doesnt exist?

A - tee

B - make

C - makefile

D - touch

Answer : D

Explanation

touch can update access and modification time apart from creating an empty file.

Q 9 - Which of the following command can give documentation of a command?

A - man

B - doc

C - info

D - synopsis

Answer : A

Explanation

Answer : A

Explanation

unix_questions_answers.htm
Advertisements