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 - Which of the following is correct to create an alias name for 'ls' as 'list'?

A - alias list=”ls”

B - alias list “ls”

C - alias “list” as “ls”

D - alias “ls” as “list”

Answer : A

Explanation

Syntax is alias alias-name=”command”.

Q 3 - Choose the command to list only the file “error.txt”

A - ls *err*.txt

B - ls e*.txt

C - ls error.???

D - ls error.txt

Answer : D

Explanation

Q 4 - Choose the correct option to replace all the occurrences of pattern1 with pattern2 using vi editor.

A - :%s/pattern1/pattern2/g

B - :%s/pattern1/pattern2/G

C - %s/pattern1/pattern2/G

D - :%s/pattern1/pattern2/G

Answer : A

Explanation

‘g’ indicate to replace globally.

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 character can be used to delete a character at the cursor position in vi?

A - a

B - b

C - x

D - y

Answer : C

Explanation

In the command mode of vi editor ‘x’ removes the character at cursor position.

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.

Q 9 - On a typical UNIX installation kernel resides in the following directory?

A - /home

B - / OR /boot

C - /image

D - None of the above.

Answer : B

Explanation

Mostly in /boot.

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