FINAL EXAM CSN 132 SP 2021
Name : ……………………………………… CUNYFIRST ID # …………………….
True / False
|1. Each device attached to a system can be represented by multiple device files.|
|2. In Linux, you are restricted to using only one type of filesystem on a system.|
|3. When you insert a DVD while in a GUI environment, it is automatically mounted by the system to a directory underneath the /media directory that is named for the label on the DVD.|
|4. The more filesystems that are used on a system, the less likely a corrupted filesystem will interfere with normal system operations.|
|5. Volumes can contain a filesystem but they can’t be mounted to directories within the Linux filesystem hierarchy.6. To prevent a file from being cleared by the BASH shell and append output to the existing output, you can specify three > metacharacters alongside the file descriptor.7. You are limited to using one pipe | metacharacter on the command line to pipe information from one command to another command.8. You can use the sed command to remove unwanted lines of text.9. Any command that can be executed on the command line can also be placed inside any environment file.10. Given the syntax command && command, the command on the left of the && construct is executed only if the command on the right of the && construct completed successfully.|
|11. A device that transfers data in a character-by-character fashion is referred to as what type of device? a. textb. block c. characterd. binary|
|12. Which device file below represents the first primary partition on the second PATA hard disk drive? a. /dev/hdc1b. /dev/hdb1 c. /dev/hda1d. /dev/hdc2|
|13. What file system below is used by software programs that write to a CD-RW or DVD-RW drive? a. ntfsb. udf c. ext2d. hpfs|
|14. In what filesystem are most of the operating system files contained? a. bootb. data c. mntd. root|
|15. The mkfs command can be issued with what switch in order to specify a filesystem type? a. -tb. -f c. -cd. -o|
|16. To mount all filesystems in the /etc/fstab file that are intended to mount at boot time, what command can be used? a. mount -ob. mount -f c. mount -ud. mount -a|
|17. Data is read from physical hard drives in concentric circles known as which of the following? a. tracksb. blocks c. sectorsd. cylinders|
|18. What command can be used to check different kinds of filesystems on Linux for errors? a. chkdskb. fs_check c. errorchkd. fsck|
|19. The quotas for certain users can be edited by using which command? a. edquotab. chquota c. usrquotad. repquota|
|20. Select the command below that shows the size of a directory and its contents in kilobytes: a. df b. du c. sizeof d. dir|
|21. In the event that you wish to disable a swap partition, what command must be used? a. umount b. swapoff c. delete_swap d. swapdrop|
|22. The standard output and standard error from a terminal screen within the BASH shell can be redirected to a file on the filesystem using what shell metacharacter, followed by the absolute or relative pathname of the file? a. #b. < c. >d. ||
|23. What command can be used to replace characters in a file sent via Standard Input? a. trb. rt c. tsd. st|
|24. Select the metacharacter that can be used to send the standard output of one command to another command as standard input: a. <b. | c. >d. #|
|25. The ability to extract, manipulate, and format text using pattern action statements belongs to which command below? a. sedb. grep c. awkd. nl|
|Completion26. Each track on a hard disk is divided into ____________________ of information.|
|27. An extended partition can contain many subpartitions called ____________________.|
|28. Any command that can take standard input and transform it into standard output is called a(n) ____________________ command.|
|29. The ____________________ environment variable contains a list of directories to search for executable programs.|
|30. The ____________________ command takes user input from stdin and places it in a variable specified by an argument.|
1. What are the three different types of hard drives? Briefly describe each, and list the possible configurations and device files for each type.
2. Define hard disk quotas, and then explain how they are used. Then, describe the differences between soft limits and hard limits.
3. Describe how the Logical Volume Manager (LVM) is used, and then list some of the different components involved.
4. Describe what file descriptors are, and then list three that can be used within the BASH shell, and discuss how they can be used.
5. Explain the while construct, and demonstrate how it can be used.