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 symbolic link for a file?

A - –s

B - –l

C - –f

D - None of the above.

Answer : A

Explanation

-s is the option to create a symbolic/soft link and applicable for only files.

Q 2 - How does a comment can begin in a shell script file.

A - Beginning with #

B - Beginning with $

C - Beginning with !

D - None of the above.

Answer : A

Explanation

A comment line begin with # (pound symbol) and is ignored by the shell.

Q 3 - Choose the odd one out.

A - write

B - mail

C - wall

D - read

Answer : D

Explanation

The rest are communication commands.

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 is the invalid file name in UNIX?

A - LINUX

B - a.widows

C - bill .gates

D - None of the above

Answer : D

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 from the following can create a file if doesn’t 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.

Answer : C

Explanation

Q 10 - Creating a soft link for file increases file’s link count.

A - True

B - False

Answer : B

Explanation

Link count gets increased by creating only hard links.

unix_questions_answers.htm
Advertisements