1.
You want to see the filesystems that are presently in use on the system. What command could you use?
Correct Answer
C. Cat /etc/mtab
Explanation
The command "cat /etc/mtab" can be used to see the filesystems that are presently in use on the system. The "/etc/mtab" file contains a list of all currently mounted filesystems on the system. By using the "cat" command, the contents of the file are displayed, allowing the user to see the filesystems that are currently in use.
2.
Jim has just purchased two new SCSI hard disk drives and a controller card for them. He properly installs the hardware in his machine. Before he can use them for data storage and retrieval, what must he do? (Choose all that apply.)
Correct Answer(s)
C. Use the fdisk command to create one or more partitions on each of the hard disk drives.
D. Mount any partitions created on the two hard drives such that they are accessible by the operating system.
E. Format any partitions created with a valid filesystem recognized by Linux.
Explanation
Jim must use the fdisk command to create one or more partitions on each of the hard disk drives. This is necessary to divide the disk space into separate sections that can be used for different purposes. He must also mount any partitions created on the two hard drives so that they are accessible by the operating system. This allows the system to recognize and access the partitions as separate storage areas. Finally, Jim must format any partitions created with a valid filesystem recognized by Linux. This prepares the partitions for data storage and retrieval by organizing the disk space and implementing the necessary file structure.
3.
Given the following output from /etc/fstab, which filesystems will be automatically checked on boot by the fsck command?LABEL=/ / ext3 defaults 1 1
none /dev/pts devpts gid=5,mode=620 1 0
none /proc proc defaults 0 1
none /dev/shm tmpfs defaults 1 0
/dev/hdc2 swap swap defaults 0 1
/dev/cdrom /mnt/cdrom iso9660 noauto,owner,kudzu,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0
Correct Answer
C. /, /proc and swap
Explanation
The filesystems that will be automatically checked on boot by the fsck command are /, /proc, and swap. This can be determined by looking at the first column of each line in the /etc/fstab output. The filesystems that have a "/" in the first column will be automatically checked on boot. In this case, /, /proc, and swap all have a "/" in the first column, indicating that they will be automatically checked.
4.
A user mounts a device to a mount point directory and realizes afterward there are files previously found within the mount point directory that are needed. What should this user do?
Correct Answer
C. Unmount the device from the directory.
Explanation
If the user realizes that there are files within the mount point directory that are needed, the best course of action would be to unmount the device from the directory. This will disconnect the device from the directory and allow the user to access the files that were previously found within the mount point directory.
5.
Which command is used to display the amount of free space that exists on a filesystem?
Correct Answer
D. Df
Explanation
The command "df" is used to display the amount of free space that exists on a filesystem. It provides information about the total disk space, used space, available space, and the percentage of space used on each mounted filesystem. This command is commonly used to check the disk usage and determine if there is enough space available for storing new files or data.
6.
What must you do to successfully run the fsck command on a filesystem?
Correct Answer
C. Unmount the filesystem.
Explanation
To successfully run the fsck command on a filesystem, it is necessary to unmount the filesystem first. This is because running fsck on a mounted filesystem can cause damage. Therefore, unmounting the filesystem ensures that it is not being accessed or modified during the fsck process, allowing for a safe and accurate check of the filesystem's integrity.
7.
What does the command dumpe2fs –h do?
Correct Answer
B. Displays the number of inodes used and available in an ext2 filesystem
Explanation
The command "dumpe2fs -h" is used to display the number of inodes used and available in an ext2 filesystem. It provides information about the file system's inode usage, such as the total number of inodes, the number of used inodes, and the number of free inodes. This command is helpful in monitoring the inode usage and determining the available space in the file system.
8.
The first floppy drive on the system is not responding. You enter the file /dev/fd0 command and receive the following output. What is the problem?
[root@server1 root]# file /dev/fd0
/dev/fd0: ASCII text
[root@server1 root]#
Correct Answer
C. The device file has become corrupt.
Explanation
The output of the command "file /dev/fd0" shows that the device file is identified as "ASCII text" instead of a specific type of device file. This suggests that the device file for the floppy drive has become corrupt, causing it to not respond.
9.
Which of the following statements are true? (Choose all that apply.)
Correct Answer(s)
A. Quotas can limit both user space and the number of files a user can own.
C. Hard limits can never be exceeded.
E. Soft limits allow a user to exceed them for a certain period of time.
Explanation
Quotas can limit both user space and the number of files a user can own. This means that a user can be restricted in terms of the amount of storage space they can use and the number of files they can have. Hard limits, on the other hand, cannot be exceeded. Once a hard limit is reached, the user will not be able to create any more files or use any more space. Soft limits, however, allow a user to temporarily exceed the set limit for a certain period of time.
10.
Hard disk drives need to be partitioned even if all space on the entire hard drive will be used and configured with one filesystem. True or False?
Correct Answer
A. True
Explanation
Hard disk drives need to be partitioned even if all space on the entire hard drive will be used and configured with one filesystem. This is true because partitioning allows for the organization and management of data on the hard drive. It helps to allocate specific portions of the disk for different purposes, such as separating the operating system files from user data. Even if the entire drive is used for one filesystem, partitioning still provides benefits in terms of data organization and management.
11.
What happens if you type mount /mnt/floppy?
Correct Answer
C. The command succeeds because a line with the necessary parameters exists in /etc/fstab.
Explanation
When you type "mount /mnt/floppy", the command succeeds because a line with the necessary parameters exists in the /etc/fstab file. The /etc/fstab file is a configuration file that contains information about filesystems and their mount points. It specifies the parameters needed to mount a filesystem, including the device name, mount point, file system type, and other options. In this case, there is a line in the /etc/fstab file that specifies the necessary parameters for mounting the floppy disk at the /mnt/floppy mount point. Therefore, the command succeeds.
12.
Which command is used to format a partition on a hard disk drive?
Correct Answer
C. Mkfs -t type device
Explanation
The command "mkfs -t type device" is used to format a partition on a hard disk drive. The "mkfs" command stands for "make file system" and it is used to create a new file system on a device. The "-t" option is used to specify the type of file system to be created, and "type" is replaced with the desired file system type (e.g. ext4, ntfs, etc.). "Device" refers to the specific partition or disk that needs to be formatted.
13.
Character devices typically transfer data more quickly than block devices. True or False?
Correct Answer
B. False
Explanation
False. This statement is incorrect. Block devices typically transfer data more quickly than character devices. Block devices transfer data in fixed-size blocks, which allows for more efficient and faster data transfer compared to character devices, which transfer data character by character.
14.
What does the du /var command do?
Correct Answer
B. Shows the size of all directories within the /var directory
Explanation
The du /var command is used to display the size of all directories within the /var directory. It provides information about the disk usage of each directory within /var, allowing the user to see the amount of space each directory is occupying. This can be helpful in identifying large directories and managing disk space efficiently.
15.
A device file _______________________. (Choose all that apply.)
Correct Answer(s)
B. Has no data section
D. Displays a major and minor number in place of a file size
Explanation
A device file has no data section because it is not used to store data like regular files. Instead, it is used to represent devices connected to the system, such as hardware components or virtual devices. It displays a major and minor number in place of a file size because these numbers are used to identify the specific device that the file represents. The major number identifies the device driver, while the minor number identifies a specific device instance.
16.
If the filesystem type is not specified with the mkfs command, it _________________.
Correct Answer
D. Uses the ext2 filesystem by default
Explanation
If the filesystem type is not specified with the mkfs command, it uses the ext2 filesystem by default.
17.
Which command mounts all existing filesystems in /etc/fstab?
Correct Answer
B. Mount -a
Explanation
The correct answer is "mount -a". This command is used to mount all filesystems listed in the /etc/fstab file. The /etc/fstab file contains information about the filesystems that should be mounted at boot time. By using the "mount -a" command, all the filesystems mentioned in the /etc/fstab file will be mounted.
18.
A user runs the fsck command with the -a option on a filesystem that is showing signs of corruption. How would that user locate any files the system was unable to repair?
Correct Answer
C. Mount the filesystem and check the lost+found directory underneath the mount point.
Explanation
When running the fsck command with the -a option on a corrupted filesystem, the system will attempt to automatically repair any errors it encounters. However, if it comes across a file that it cannot repair, it will move that file to a special directory called "lost+found". To locate any files that the system was unable to repair, the user needs to mount the filesystem and check the lost+found directory located underneath the mount point. This directory will contain any files that were found to be corrupted or damaged during the fsck process.