This set of Unix Multiple Choice Questions & Answers (MCQs) focuses on “Administrator Specific Commands and Privileges – 3”.
1. Which command is used to find out the consumption of a specific directory?
a) du
b) df
c) mem
d) dv
View Answer
Explanation: 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
View Answer
Explanation: 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
View Answer
Explanation: 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.
# du -s /home/*
4. A device file contains no data.
a) True
b) False
View Answer
Explanation: 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
View Answer
Explanation: 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:
# ls -l /dev
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
View Answer
Explanation: 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
View Answer
Explanation: 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
View Answer
Explanation: 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
View Answer
Explanation: 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
View Answer
Explanation: 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
View Answer
Explanation: 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
View Answer
Explanation: 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
View Answer
Explanation: 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
View Answer
Explanation: -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
View Answer
Explanation: tar command cannot use the standard input to obtain its file list. It accepts only file and directory name as arguments.
Sanfoundry Global Education & Learning Series – Unix.
To practice all areas of Unix, here is complete set of 1000+ Multiple Choice Questions and Answers.
- Get Free Certificate of Merit in Unix
- Participate in Unix Certification Contest
- Become a Top Ranker in Unix
- Take Unix Tests
- Chapterwise Practice Tests: Chapter 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
- Chapterwise Mock Tests: Chapter 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
- Buy MCA Books
- Apply for Unix Internship
- Buy Computer Science Books
- Practice MCA MCQs
- Apply for Computer Science Internship