v1
v2
v3
100

You are requested to help a user who reports that he has no more local storage space. You go to his system and log in as the root user.

Which of the following commands will display the available disk space on all partitions? (Select TWO).

a. fdisk -free

b. df

c. du -h

d. du -a

e. dskuse -free

f. df -h

what is 

b. df

f. df -h

Explanation

df shows the size, used blocks, and available blocks for each partition. Using df -h shows the same information in bytes instead of blocks.

du is used to show the disk usage of each file in a directory in blocks; du -a is for all files, and du -h shows the usage in bytes, not blocks. Fdisk is used for partitioning a drive. There is no dskuse command.

References

TestOut Linux Pro 5.0 - 8.6 File System Maintenance

100

You have created a separate partition for the sales team and mounted it to the /sales directory. The team is about to begin a new project, and they want to make sure there is enough disk space to hold upcoming files.

Which of the following commands will show you the amount of free space?

a. df /sales

b. diff /sales

c. part /sales

d. free /sales

what is

a. df /sales

Explanation

Use the df /sales command to view the free space on the partition.


Use the free command to show memory statistics. Use the diff command to compare two files.


References

TestOut Linux Pro 5.0 - 8.6 File System Maintenance

100

Which command should you enter at the command prompt to display the current user's quota limits and disk usage? 

a. quota

b. quota -a

c. quota -v

what is 

a. quota

Explanation

Use quota to display the current user's quota. Be aware of the following options:

  • -u shows the quota for a user.

  • -g shows the quota for a group

  • -v shows current the current usage, the hard quota, and the soft quota for blocks and inodes.

References

TestOut Linux Pro 5.0 - 8.7 Disk Quotas

200

You have added several new hard disks to your system. After partitioning and formatting, you have modified a configuration file to mount these new file systems automatically. You want to document the change you made.

Which of the following configuration files would you document?

a. /etc/fstab

b. /etc/crontab

c. /etc/inittab

what is 

a. /etc/fstab

Explanation

You want to document the changes you made in /etc/fstab.

/etc/inittab defines the initial processes on boot-up. /etc/modules.conf defines kernel loadable modules. /etc/crontab defines jobs that run at particular dates and times.

References

TestOut Linux Pro 5.0 - 8.5 Mounting File Systems

200


You suspect your /dev/sda3 partition is in need of repair.

Which of the following fsck options will repair the errors without any interaction from you?

Answer

a. -a

b. -b

c. -t

what is

a. -a

Explanation

Use fsck -a to automatically repair the /dev/sda partition without any interaction from you (no questions appear).

Other fsck options include the following:

-s serializes fsck when multiple file systems are checked.

-t specifies the type(s) of file system to be checked.

-r prompts for confirmation when errors are found and ask permission to fix the errors (only when -a is not specified).


References

TestOut Linux Pro 5.0 - 8.6 File System Maintenance

200

After creating the aquota.user and aquota.group files in the /home directory, what command should you enter to enable quotas for the /home directory? 

a. quotaon /home 

b. quotaon -a /home 

c. quotaon -v /home 

what is 

a. quotaon /home

Explanation

quotaon /home enables quotas for the /home directory. Use quotaon to enable quotas for the mounted file system.

  • -a enables all mounted file systems listed in /etc/mtab.

  • -v runs the command in verbose mode.

References

TestOut Linux Pro 5.0 - 8.7 Disk Quotas

300

You need to mount the CD-ROM device to the /media/cdrom directory. What command should you enter at the command prompt?

a. /mount

b. /mount/cd

c. mount /dev/cdrom /media/cdrom 

what is

c. mount /dev/cdrom /media/cdrom

Explanation

Use mount /dev/cdrom /media/cdrom to mount the CD-ROM device to the /media/cdrom mount point. The /dev/cdrom device file name is just a symbolic link to the actual device (sr0), so mount /dev/sr0 /media/cdrom will also work.

References

TestOut Linux Pro 5.0 - 8.5 Mounting File Systems

300

Anna is attempting to unmount the mount point /mnt/data.  The umount command failed and displayed error message stating that the device is busy.  Anna suspects there my be an open file causing the issue. 

Which of the following commands will show Anna a list of open files?

a. uname

b. lsof

c. awk

d. stat

what is

b. lsof

Explanation

lsof displays open files in the file system. lsof displays the following information by default:


The command used to access the file

Process ID

Name of the user accessing the file

A file descriptor

File node type

Device numbers

File size

Inode address

File path

awk is an interpreter for the AWK text processing language.


stat displays the status of a file or process.  You would first need to know the name of the file or process.


uname shows information about the system.


References

TestOut Linux Pro 5.0 - 8.6 File System Maintenance

300

Which of the following statements best describes the function of the repquota /home -vu command?

a. The /home quota file is opened in vi for editing.

b. A summary of disk usage and quotas is displayed for the users who have files within /home.

c. The current user's quota limits and usage for /home are displayed.


what is

b. A summary of disk usage and quotas is displayed for the users who have files within /home.

Explanation

The repquota /home -vu command displays a summary of disk usage and quotas for those users who have files within /home. The repquota command displays a summary of the disk usage and quotas for the specified file systems, including the specific number of files and used space by user. Common options include the following:


-v reports all quotas, even if there is no usage.


-n does not resolve user and group names to speed printing time.


-u and -g reports for users and groups respectively.


-a gives information for all file systems listed in /etc/mtab.


Use edquota to open and edit a user's quota, edit a group's quota, or change the grace period. Use quotacheck to create the aquota.user and aquota.group files in the file system. Use quota to display the current user's quota.


References

TestOut Linux Pro 5.0 - 8.7 Disk Quotas

400

Your ext3 file system has experienced a significant amount of corruption. To examine the file system, you want to use the debugfs utility.

Which of the following debugfs options should you use to examine the file system?

a. -Z

b. -w

c. -c

what is

c. -c

Explanation

Use debugfs -c to specify the file system should open in catastrophic mode. debugfs is useful for file systems with significant corruption. debugfs examines and changes the state of an ext2, ext3, or ext4 filesystem. It allows administrators to unlink directories, change inode blocks, find all inodes that point to a block, and several other similar functions. Other debugfs command options include the following:


-w specifies the filesystem should open in read-write mode.


-f executes commands in a text file.


-Z prints the version number of debugfs and exits.


References

TestOut Linux Pro 5.0 - 8.6 File System Maintenance

400

What is the name of the package that must be installed if you want to use disk quotas on your Linux system? 

a. quote

b. quota

c. ext4

what is 

b. quota

Explanation

If the quota package is not installed on your system, you can install it with the dnf install command. quotaon.service is used to enable quotas on a given file system.

References

TestOut Linux Pro 5.0 - 8.7 Disk Quotas

400

Which of the following repquota options will give quota limits and disk usage for all file systems listed in /etc/mtab?

a. -a

b. -v

c. -u

what is 

a. -a

Explanation

repquota -a gives information for all file systems listed in /etc/mtab. Be aware of the other common repquota options:

  • -v reports all quotas, even if there is no usage.

  • -n does not resolve user and group names to speed printing time.

  • -u and -g report on users and groups respectively.

500

You are inspecting the superblocks and block information on your file system. You need dumpe2fs to display only the blocks that are reserved as bad in the file system.


Which of the following options should you use?

a. -b

b. -h

c. -f

d. -x

what is 

a. -b

Explanation

Use dumpe2fs -b to print the blocks that are reserved as bad in the file system. dumpe2fs prints superblock and block information for an ext2, ext3, or ext4 file system. This includes information for each sector on the partition about sector type, block ranges, inode information, free blocks, and similar information. Other dump32fs command options include the following:


-h prints only super block information.


-f forces dumpe2fs to display a file system even though it may have some file system feature flags the system may not understand.


-x prints group information block numbers in hexadecimal format.

References

TestOut Linux Pro 5.0 - 8.6 File System Maintenance

500

Which of the following commands will open the quota file for a specific user?

a. repquota -u

b. edquota -u

c. quota -u

d. quotaon -u

what is

b. edquota -u

Explanation

Use edquota -u to open and edit the quota file for a specific user.


quota -u displays the user's quota. repquota displays a summary of the disk usage and quotas for the specified file systems, including the specific number of files and used space. quotaon enables quotas for the mounted file system; however, it does not a have a -u option.


References

TestOut Linux Pro 5.0 - 8.7 Disk Quotas

500

Which of the following commands displays the disk usage and quota limits for the development group?

a. quota -g development

b. quotacheck -g development

c. repquota development

d. edquota -g development

what is 

a. quota -g development

Explanation

Use quota -g development to display the disk usage and quota limits for the development group. By default, the quota command displays the current user's quota usage, but the -g option specifies a group.

repquota displays the disk usage and quota limits for groups if the -g option is present. quotacheck creates the aquota.user and aquota.group files in the file system. Use edquota to open and edit a user's quota, edit a group's quota, or change the grace period.

References

TestOut Linux Pro 5.0 - 8.7 Disk Quotas

M
e
n
u