System Administrator MCQs Questions Answers – UNIX

By: Prof. Fazal Rehman Shamil
Last modified on April 22nd, 2021

Solved MCQs of Deleting and Renaming files: rm and mv Command fo System Administrator in UNIX.

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


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


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


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


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


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


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


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


By using the single rm command, multiple files
can be deleted.
(A). True
(B). False
(C). Partially True
Multiple Choice Question Answer: a


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


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


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


The inode number associated with a file is changed after renaming it.
(A). True
(B). False
(C). Partially True
Multiple Choice Question Answer: b


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


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


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


Recursive deletion is performed by____
(A). -r
(B). -R
(C). *
(D). -r and -R
(E). None of these
Multiple Choice Question Answer: d