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 - 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 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 - Which mail command can be used to save the mail onto a file?

A - s

B - f

C - d

D - w

Answer : A

Explanation

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 create links for file/directory?

A - lk

B - ln

C - new

D - makelink

Answer : B

Explanation

ln is the command used to create hard/soft link for a file and hard link for a directory.

Answer : D

Explanation

sed is one of the early Unix commands built for command line processing of data files.

Q 8 - What are the options used to list the contents of a .tar file?

A - cvf

B - tvf

C - xvf

D - lvf

Answer : B

Explanation

‘t’ to list out, ‘v’ is verbose mode & ‘f’ for target file.

Answer : A

Explanation

Q 10 - Out of the following which can place in home directory?

A - cd

B - cd ~

C - Both (a) and (b)

D - None.

Answer : C

Explanation

unix_questions_answers.htm
Advertisements