Explore topic-wise MCQs in Unix.

This section includes 14 Mcqs, each offering curated multiple-choice questions to sharpen your Unix knowledge and support exam preparation. Choose a topic below to get started.

1.

pwd and echo $HOME will display the same output.

A. True
B. False
Answer» C.
2.

For creating or removing directories, the user must be positioned above the directory or in the parent directory of the directory, on which the operation is to perform.

A. True
B. False
Answer» B. False
3.

Multiple directories can be removed using single rmdir command.

A. True
B. False
Answer» B. False
4.

Which command is used for removing an empty directory?

A. mkdir
B. rmdir
C. del
D. remove
Answer» C. del
5.

Sometimes we are unable to create a directory because ______________

A. the directory may already exist in the current directory
B. there may be an ordinary file by the same name in the current directory
C. the permissions set for the current directory does not allow the creation
D. the directory may exist, there may be an ordinary file, the permissions set for the current directory does not allow the creation
Answer» E.
6.

WHICH_COMMAND_IS_USED_FOR_REMOVING_AN_EMPTY_DIRECTORY??$

A. mkdir
B. rmdir
C. del
D. remove
Answer» B. rmdir
7.

Multiple_directories_can_be_removed_using_single_rmdir_command.$

A. True
B. False
Answer» B. False
8.

If rmdir dir001 fails, what could be the reason(s)?

A. dir001 doesn’t exist
B. dir001 is not empty
C. permissions of dir001 doesn’t allow to remove it
D. dir001 doesn’t exist, dir001 is not empty and permissions of dir001 doesn’t allow to remove it
Answer» C. permissions of dir001 doesn‚Äö√Ñ√∂‚àö√ë‚àö¬•t allow to remove it
9.

Sometimes we are unable to create a directory because _____________?

A. the directory may already exist in the current directory
B. there may be an ordinary file by the same name in the current directory
C. the permissions set for the current directory does not allow the creation
D. the directory may exist, there may be an ordinary file, the permissions set for the current directory does not allow the creation
Answer» C. the permissions set for the current directory does not allow the creation
10.

We can create multiple directories by single invocation of mkdir command.

A. True
B. False
Answer» B. False
11.

Which command is used for creating directories?

A. rmdir
B. mkdir
C. cd
D. cp
Answer» C. cd
12.

cd command cannot be used without any argument.

A. True
B. False
Answer» C.
13.

Which command is used for changing the current directory?

A. cd
B. cp
C. pwd
D. rm
Answer» B. cp
14.

Which command is used for printing the current working directory?

A. HOME
B. cd
C. pwd
D. dir
Answer» D. dir