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 - Choose the command to print the current working directory

A - cwd

B - pwd

C - wd

D - nwd

Answer : B

Explanation

pwd (present working directory).

Answer : D

Explanation

We can provide the permission values in octal number system and 888 is not a valid octal number.

Q 3 - Which command can be used to delete a file?

A - del

B - remove

C - rm

D - delete

Answer : C

Explanation

rm, can delete a file as well as a directory.

Q 4 - Which command can be used to determine file type by its content?

A - file

B - ls l

C - type

D - None of the above.

Answer : A

Explanation

Command file determines the file type by MIME.

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 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 can be used to count characters in a text file?

A - ccount

B - fsize

C - count

D - wc

Answer : B

Explanation

wc, apart from counting characters it can also count number of line & words.

Q 8 - 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 : C

Explanation

Oracle Corporation took over Sun microsystems

Q 10 - What is the PID of the process init

A - S

B - 1

C - 0

D - 8

Answer : B

Explanation

unix_questions_answers.htm
Advertisements