nerdexam
CompTIA

XK0-005 · Question #235

An administrator receives an alarm because the disk of one of the sewers is running out of space. Which of the following commands can be used to see the space that each partition is using?

The correct answer is A. df -h. To determine the disk space usage for each mounted partition on a Linux system, the df command provides a clear overview.

System Management

Question

An administrator receives an alarm because the disk of one of the sewers is running out of space. Which of the following commands can be used to see the space that each partition is using?

Options

  • Adf -h
  • Bdu -scg /
  • Cfdisk -l
  • Dfsck /

How the community answered

(31 responses)
  • A
    94% (29)
  • C
    3% (1)
  • D
    3% (1)

Why each option

To determine the disk space usage for each mounted partition on a Linux system, the `df` command provides a clear overview.

Adf -hCorrect

The `df -h` command displays disk space usage for all mounted filesystems (partitions) in a human-readable format, showing total size, used space, available space, and percentage used for each partition, which directly answers the administrator's need.

Bdu -scg /

`du -scg /` calculates the disk usage of files and directories *within* the specified path (`/` in this case) and provides a total, but it doesn't show the overall usage statistics for each mounted partition.

Cfdisk -l

`fdisk -l` lists the partition table and sizes of disk partitions but does not report their current usage or free space, which is dynamic filesystem information.

Dfsck /

`fsck /` is a utility used to check and repair Linux filesystems for errors, not to report on their current disk space utilization.

Concept tested: Linux disk space usage reporting

Source: https://www.man7.org/linux/man-pages/man1/df.1.html

Topics

#disk space management#file system monitoring#df command#Linux commands

Community Discussion

No community discussion yet for this question.

Full XK0-005 Practice