Unix Mock Test


This section presents you various set of Mock Tests related to Unix Framework. You can download these sample mock tests at your local machine and solve offline at your convenience. Every mock test is supplied with a mock test key to let you verify the final score and grade yourself.

Questions and Answers

Unix Mock Test IV

Q 1 - 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 2 - Which switch of rm command is used to remove a directory with all its subdirectories forcibly?

A - rm –rfi

B - rm –ri

C - rm –rf

D - rm –r

Answer : C

Explanation

–r mean recursively and –f means forcibly.

Q 3 - Which command can be used to display file contents in octal?

A - od

B - octal

C - oshow

D - oct

Answer : A

Explanation

od full form is octal dump.

Q 4 - What is command used to print the directory stack?

A - popd

B - dir

C - dirs

D - ls –d

Answer : C

Explanation

Q 5 - Which command can be used to make variables of shell to be made available to sub shell?

A - import

B - export

C - echo

D - set

Answer : B

Explanation

As in the following example

$ var = "tutorialspoint"

$ export var

$ bash -c "echo $var"

Answer : A

Explanation

Q 7 - Identify the command to remove a directory from directory stack.

A - pushd

B - popd

C - eject

D - enqueue

Answer : B

Explanation

Q 8 - Which command can introduce clock delay?

A - sleep

B - wait

C - suspend

D - delay

Answer : A

Explanation

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 - Mount point for templorary removable devices is ___

A - /

B - /mnt

C - /dev

D - /tmp

Answer : B

Explanation

Q 11 - In general the working directory of the user root is __

A - /

B - /root

C - /admin

D - /home/root

Answer : B

Explanation

This path is editable even after installation of the system.

Q 12 - Superuser can change only the following permissions of a file.

A - Others

B - Owner

C - Group

D - All of the above.

Answer : D

Explanation

Answer : C

Explanation

Answer : C

Explanation

Oracle Corporation took over Sun microsystems

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

A - man

B - doc

C - info

D - synopsis

Answer : A

Explanation

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

A - cd

B - cd ~

C - Both (a) and (b)

D - None.

Answer : C

Explanation

Q 17 - The default number of link count for a newly created file is __

A - 0

B - 1

C - 2

D - 4

Answer : B

Explanation

Q 18 - Job number and PID are same.

A - True

B - False

Answer : B

Explanation

PID is given by OS, whereas Job number is the utility program which initiates process.

Q 19 - /proc holds information about ___

A - Processors

B - Processes

C - Device drivers

D - System procedures

Answer : B

Explanation

Answer : A

Explanation

Q 21 - Choose the example for character special file.

A - Floppy disk

B - Mouse

C - Memory

D - Flash drive

Answer : B

Explanation

Q 22 - Choose the example for block special file

A - DVD-ROM

B - Serial modem

C - Console terminal

D - Virtual terminal

Answer : A

Explanation

Q 23 - 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.

Q 24 - Identify the invalid run level from the following.

A - S

B - 1

C - 0

D - 8

Answer : D

Explanation

Q 25 - What is the PID of the process ‘init’

A - S

B - 1

C - 0

D - 8

Answer : B

Explanation

Answer Sheet

Question Number Answer Key
1 D
2 C
3 A
4 C
5 B
6 A
7 B
8 A
9 B
10 B
11 B
12 D
13 C
14 C
15 A
16 C
17 B
18 B
19 B
20 A
21 B
22 A
23 B
24 D
25 B
unix_questions_answers.htm
Advertisements