Unix Directory Management MCQs
Directory Management MCQs : This section focuses on "Directory Management" in unix. These Multiple Choice Questions (MCQ) should be practiced to improve the unix skills required for various interviews (campus interviews, walk-in interviews, company interviews), placements, entrance exams and other competitive examinations.
1. The directory in which you find yourself when you first login is called your ______________.
A. Root directory
B. Shell directory
C. Home directory
D. Kernel directory
View Answer
Ans : C
Explanation: The directory in which you find yourself when you first login is called your home directory.
2. which command is used to create a directory?
A. makedir
B. mkdirectory
C. makedirectory
D. mkdir
View Answer
Ans : D
Explanation: $mkdir dirname is used to create a directory.
3. Which command is used to list all the directory?
A. lsdir
B. listdir
C. ls
D. dir
View Answer
Ans : C
Explanation: $ls dirname is used to list all directory.
4. which command is used to rename Directories?
A. rename
B. mv
C. rm
D. rmdir
View Answer
Ans : B
Explanation: The mv (move) command can also be used to rename a directory.
5. which command is used to change the directory?
A. cd
B. mv
C. ls
D. cm
View Answer
Ans : A
Explanation: You can use the cd command to do more than just change to a home directory.
6. PWD stand for?
A. Parent working directory
B. present working directory
C. past working directory
D. None of the above
View Answer
Ans : B
Explanation: PWD Stand for present working directory.
7. Which of the following is true about Absolute pathnames?
A. A pathname is absolute, if it is described in relation to root.
B. absolute pathnames does not begin with a /.
C. absolute pathnames always begin with a /
D. Both A and C
View Answer
Ans : D
Explanation: A pathname is absolute, if it is described in relation to root, thus absolute pathnames always begin with a /.
8. In how many categories are links divided?
A. 1
B. 2
C. 3
D. 4
View Answer
Ans : B
Explanation: There are basically two types of links; hard link and soft links.
9. Which option is used with ls command to list the directory attributes rather than its contents?
A. -a
B. -b
C. -c
D. -d
View Answer
Ans : D
Explanation: ls command when combined with -d option displays the attributes of a directory rather than its contents.
10. For moving two level up in the file hierarchy system using cd command once, we separates ( . . ) by which symbol?
A. /
B. \\
C. //
D. \
View Answer
Ans : A
Explanation: If we want to move more than one level up then we can use the ( . . ) separated by / .
Discussion