Advanced Operating System MCQs

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

Solved MCQs on Advanced Operating System.

Compressing and Archiving Files MCQs in OS

To append files to the end of an archive, what option the tar uses?
(A). -t
(B). -c
(C). -x
(D). -r
(E). None of these
Multiple Choice Question Answer: d


Unzip asks for the user confirmation to replace the existing file or not If the uncompressed file is already on disk.
(A). True
(B). False
(C). Partially True
Multiple Choice Question Answer: a


To view the attributes of contents of an archive, what command do we use?
(A). tar -tvf abc.tar
(B). tar -cvf abc.tar
(C). tar -xvf abc.tar
(D). tar -t abc.tar
(E). None of these
Multiple Choice Question Answer: a


With tar for creating an archive, what key options do we use?
(A). -c
(B). -x
(C). -t
(D). -f archive name
(E). None of these
Multiple Choice Question Answer: a


For creating an archive named abc.tar consisting of two files, file01 and file02, we use the command___
(A). tar -cvf abc.tar file01 file02
(B). tar -cvf file01 file02 abc.tar
(C). tar -cv abc.tar file01 file02
(D). tar -c abc.tar file01 file02
(E). None of these
Multiple Choice Question Answer: b


To view the contents of a compressed archive, what option do we use with unzip command?
(A). -v
(B). -t
(C). -c
(D). -x
(E). None of these
Multiple Choice Question Answer: a


For compressing and archiving files together, what command do we use?
(A). gzip and tar
(B). gzip
(C). bzip2
(D). zip
(E). None of these
Multiple Choice Question Answer: d


To extract the files from an archive named abc.tar, what command do we use?
(A). tar -xvf abc.tar
(B). tar -cvf abc.tar
(C). tar -tvf abc.tar
(D). tar -t abc.tar
(E). None of these
Multiple Choice Question Answer: a


First argument should be a compressed filename, to use a zip command.
(A). True
(B). False
(C). Partially True

Multiple Choice Question Answer: a


The -r option is used by zip for recursive compression.
(A). True
(B). False
(C). Partially True

Multiple Choice Question Answer: a


To unzip the files which are compressed using zip command, what command do we use?
(A). gunzip
(B). gzip
(C). unzip
(D). guzip
(E). None of these
Multiple Choice Question Answer: c


The zip and unzip perform every function that is performed by gzip, gunzip and tar.
(A). True
(B). False
(C). Partially True

Multiple Choice Question Answer: a

MCQs on File Handling Commands: pwd, cd

Multiple directories are made by single invocation of the mkdir command.
(A). True
(B). False

(C). Partially True

Multiple Choice Question Answer: a


$ mkdir dir dir/dir_01/dir_02
The given command will___
(A). create dir, dir_01 and dir_02
(B). creates dir_02
(C). creates dir only
(D). throws an error
(E). None of these
Multiple Choice Question Answer: a


To remove an empty directory, what command do we use?
(A). mkdir
(B). rmdir
(C). del
(D). remove
(E). None of these
Multiple Choice Question Answer: b


To create or remove the directories, user should be positioned above the directory or should be in the parent directory of that directory, at which the operation is to perform.
(A). True
(B). False
(C). Partially True
Multiple Choice Question Answer: a


What is the reason if rmdir dir001 fails,?
(A). dir001 doesn’t exist
(B). dir001 is not empty
(C). it is not allowed to remove by the permissions of dir001
(D). the dir001 is not existing, dir001 is not empty and it is not allowed to remove by the permissions of dir001
(E). None of these
Multiple Choice Question Answer: d


Due to what, sometimes we can’t create a directory?
(A). The directory is already present in the current directory
(B). There can be the ordinary file of the same name in that current directory
(C). creation is not allowed by the permissions that are set for the current directory
(D). The directory may be existing but there may be an ordinary file existing, creation is not allowed by the permissions that are set for the current directory n
(E). None of these
Multiple Choice Question Answer: d


By using the single rmdir command Multiple directories are removed.
(A). True
(B). False
(C). Partially True
Multiple Choice Question Answer: a


To print the current working directory, what command do we use?
(A). HOME
(B). cd
(C). pwd
(D). dir
(E). None of these
Multiple Choice Question Answer: c


To change the current directory, what command do we use?
(A). cd
(B). cp
(C). pwd
(D). rm
(E). None of these
Multiple Choice Question Answer: a


The cd command is not used without an argument.
(A). True
(B). False
(C). Partially True
Multiple Choice Question Answer: b


To create the directories, what command do we use?
(A). rmdir
(B). mkdir
(C). cd
(D). cp
(E). None of these
Multiple Choice Question Answer: b


The same output is displayed by pwd and echo $HOME.
(A). True
(B). False
(C). Partially True
Multiple Choice Question Answer: b