System Administrator MCQs Questions Answers – UNIX
1 . A directory can be deleted by which command is not empty?
(A). rm -r
(B). rmdir
(C). rm *
(D). del *
(E). None of these
Multiple Choice Question Answer: a
2. What option do we use with the mv command so that the destination file is not overwritten?
(A). -n
(B). -f
(C). -b
(D). -i
(E). None of these
Multiple Choice Question Answer: a
3. The command used for renaming the files is_____
(A). rename
(B). mv
(C). cp
(D). move
(E). None of these
Multiple Choice Question Answer: b
4. If a destination file doesn’t exist, the mv command can create it.
(A). True
(B). False
(C). Partially True
Multiple Choice Question Answer: a
5. What will happen if the destination file specified in mv command is already existing?
(A). it will be deleted
(B). it will not be affected
(C). it will be overwritten
(D). an error will occur
(E). None of these
Multiple Choice Question Answer: c
6. Apart from renaming the files, mv command can____
(A). move a file
(B). move a group of files
(C). rename a directory
(D). also move the group of files and rename the directory
(E). None of these
Multiple Choice Question Answer: d
7. When -f option is used with mv command this overwrites the existing files with no prompting messages.
(A). True
(B). False
(C). Partially True
Multiple Choice Question Answer: a
8. To remove/delete files in UNIX, what command do we use?
(A). rmdir
(B). rm
(C). del
(D). mv
(E). None of these
Multiple Choice Question Answer: b
9. By using the single rm command, multiple files
can be deleted.
(A). True
(B). False
(C). Partially True
Multiple Choice Question Answer: a
10. What do we use for deleting all files in a directory?
(A). rmdir *
(B). mv *
(C). rm *
(D). del *
(E). None of these
Multiple Choice Question Answer: c
11. What option we can use with rm command if we wish to delete or remove a file forcefully?
(A). -i
(B). -r
(C). -R
(D). -f
(E). None of these
Multiple Choice Question Answer: d
12. To remove file named -file.txt, what command do we use?
(A). rm -file.txt
(B). rm file.txtrm
(C). rm — -file.txt
(D). rm -f file.txt
(E). None of these
Multiple Choice Question Answer: c
13. The inode number associated with a file is changed after renaming it.
(A). True
(B). False
(C). Partially True
Multiple Choice Question Answer: b
14. To backup the destination file in mv command, what option do we use?
(A). -b
(B). -f
(C). -v
(D). -i
(E). None of these
Multiple Choice Question Answer: a
15. By using rm command because of permissions associated with it, Some files are not deleted.
(A). True
(B). False
(E). None of these
Multiple Choice Question Answer: a
16. With rm command for interactive deletion, what option do we use?
(A). -i
(B). -f
(C). -r
(D). -R
(E). None of these
Multiple Choice Question Answer: a
17. Recursive deletion is performed by____
(A). -r
(B). -R
(C). *
(D). -r and -R
(E). None of these
Multiple Choice Question Answer: d