Advanced Operating System MCQs

1. 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
2. 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
3. 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
4. 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
5. 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
6. 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
7. 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
8. 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
9. First argument should be a compressed filename, to use a zip command.
(A). True
(B). False
(C). Partially True
Multiple Choice Question Answer: a
10. The -r option is used by zip for recursive compression.
(A). True
(B). False
(C). Partially True
Multiple Choice Question Answer: a
11. 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
12. 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

1. Multiple directories are made by single invocation of the mkdir command.
(A). True
(B). False
(C). Partially True
Multiple Choice Question Answer: a
2. $ 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
3. 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
4. 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
5. 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
6. 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
7. By using the single rmdir command Multiple directories are removed.
(A). True
(B). False
(C). Partially True
Multiple Choice Question Answer: a
8. 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
9. 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
10. The cd command is not used without an argument.
(A). True
(B). False
(C). Partially True
Multiple Choice Question Answer: b
11. 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
12. The same output is displayed by pwd and echo $HOME.
(A). True
(B). False
(C). Partially True
Multiple Choice Question Answer: b