250+ TOP MCQs on Administrator Specific Commands and Privileges

Unix Multiple Choice Questions on “Administrator Specific Commands and Privileges”.

1. Which command is used to find out the consumption of a specific directory?
a) du
b) df
c) mem
d) dv

Answer: a
Clarification: Sometimes, we may need to find out the consumption of a specific directory rather than an entire file system. For this purpose, du command is used. This command reports usage by recursive examination of the directory structure.

2. Which option is used with du command for finding only the summary of disk usage by a specific directory?
a) -e
b) -f
c) -e
d) -s

Answer: d
Clarification: If we use the du command, then by default it displays the usage of each subdirectory of its argument along with a summary at the end. If we want to display the only summary then we can use -s option with du command. For example,

# du  -s  /home/user10/doc
78954    /home/user10/doc

3. du command can also be used for reporting the disk space consumed by each user.
a) True
b) False

Answer: a
Clarification: Most of the dynamic space in the system is consumed by users, their directories and files. We can use the following command if we want to know the disk space consumed by each user.

4. A device file contains no data.
a) True
b) False

Answer: a
Clarification: A device file is a file which is built into the kernel for each and every device of the system. Whenever we open a device, read or write to it, all these functions are performed using device files.

5. All the device files are stored in _____
a) kernel
b) /home/usr
c) /dev
d) /home

Answer: c
Clarification: A device file is a file which is built into the kernel for each and every device of the system. All the device files are stored in /dev or in its subdirectories. To view the list of device files on your system, use the following command:

6. The set of routines needed to operate a specific device is known as ________
a) device file
b) device program
c) device driver
d) device software

Answer: c
Clarification: The set of routines needed to operate a specific device is known as a device driver. Whenever a particular device is accessed, the kernel calls the correct device driver and passes some parameters to it.

7. For formatting diskettes, we can use the _______ command.
a) format
b) fdformat
c) frmt
d) format and fdformat

Answer: d
Clarification: Before backing up data to a floppy, we may need to format it. For this purpose, either format or fdformat command is used (whichever is supported by your system).

8. ___ command performs copying of diskettes.
a) pp
b) df
c) du
d) dd

Answer: d
Clarification: dd (disk jump) command can be used in copying files systems, but is majorly used for copying media (floppies and tapes).

9. Which of the following is a backup program?
a) bckup
b) trap
c) ciop
d) cpio

Answer: d
Clarification: As a system administrator, you are responsible for creating a backup of the data which resides on your system. For this purpose, there are mainly two backup programs which are extensively used i.e. cpio and tar. The cpio command copies files to and from a backup device.

10. cpio program can be used with redirection and piping.
a) True
b) False

Answer: a
Clarification: The cpio command copies files to and from a backup device. It uses the standard input for taking the list of filenames and then copies them with their content and header to standard output which can also be redirected to a file or a device. Hence, cpio can be used with redirection and piping.

11. Which of the following options are used with the cpio program?
a) -a
b) -i
c) -o
d) -i and -o

Answer: d
Clarification: cpio command uses two key options, -o (output) and -i (input). The -o option is used for backing up files while the -i option is used for restoring files.

12. tar command uses ___ option for backing up files.
a) -a
b) -c
c) -d
d) -f

Answer: b
Clarification: The tar (tape archive) command is more powerful than cpio command. For creating a backup using tar, we have to use the -c option. For example,

# tar -cvf  /dev/rdsk/f0987yu   /home/user/doc/SQL

13. For restoring files using tar, ____ option is used.
a) -a
b) -c
c) -v
d) -x

Answer: d
Clarification: Files can be restored using -x option with the tar command. When no file or directory is specified it restores all the files from the backup device.

# tar  -xvf  /dev/rdsk/f0987yu

14. For displaying the archive, -t option is used with the tar command.
a) True
b) False

Answer: a
Clarification: -t option alike cpio is also used with tar command for displaying the archive. For example,

# tar  -tvf  /dev/rdsk/f0987yu

15. tar command can use the standard input to obtain its file list.
a) True
b) False

Answer: b
Clarification: tar command cannot use the standard input to obtain its file list. It accepts only file and directory name as arguments.

Leave a Reply

Your email address will not be published. Required fields are marked *