Which command is used to view disk usage in a human-readable format?

Prepare for the Linux Professional Institute Certification Level 1 (LPIC-1) Test. Use flashcards and multiple choice questions with hints and explanations. Ace your exam!

Multiple Choice

Which command is used to view disk usage in a human-readable format?

Explanation:
The command that is used to view disk usage in a human-readable format is "du -h." The "du" command stands for "disk usage" and is specifically designed to display the amount of disk space used by files and directories. When you include the "-h" option, it modifies the output to show sizes in a more understandable way, using units like Kilobytes (K), Megabytes (M), or Gigabytes (G) instead of just bytes. While "df -h" can also provide information about disk usage, it displays the overall usage of file systems rather than the space used by individual files and directories. "diskusage" and "usage -h" are not standard commands in Linux for viewing disk usage. Therefore, the correct usage here is indeed the "du -h" command, as it directly meets the requirement of showing disk usage in a human-readable format.

The command that is used to view disk usage in a human-readable format is "du -h." The "du" command stands for "disk usage" and is specifically designed to display the amount of disk space used by files and directories. When you include the "-h" option, it modifies the output to show sizes in a more understandable way, using units like Kilobytes (K), Megabytes (M), or Gigabytes (G) instead of just bytes.

While "df -h" can also provide information about disk usage, it displays the overall usage of file systems rather than the space used by individual files and directories. "diskusage" and "usage -h" are not standard commands in Linux for viewing disk usage. Therefore, the correct usage here is indeed the "du -h" command, as it directly meets the requirement of showing disk usage in a human-readable format.