Which command can be used to check disk usage of directories?

Study for the LPI 101-500 Exam. Prepare with flashcards and multiple choice questions, each with hints and explanations. Get exam ready!

Multiple Choice

Which command can be used to check disk usage of directories?

Explanation:
The command used to check disk usage of directories is "du," which stands for disk usage. When executed, the "du" command provides a report of the disk space utilized by a directory and its subdirectories. It summarizes the total space used for each directory level, which allows users to identify how much space is consumed on a per-directory basis. The "du" command can also be modified with various options, such as displaying sizes in a human-readable format (typically using the -h flag) or by summarizing total usage with the -s flag. This command is particularly useful for managing disk space and identifying any directories that may be consuming excessive storage. Other commands related to disk space may not provide the same level of detail for directories. For example, "df" gives an overview of available and used disk space on mounted filesystems rather than specific directories. "ls" merely lists files and directories along with their basic attributes, while "ncdu" is a more advanced tool for analyzing disk usage interactively but is not as straightforward as "du" for simple queries.

The command used to check disk usage of directories is "du," which stands for disk usage. When executed, the "du" command provides a report of the disk space utilized by a directory and its subdirectories. It summarizes the total space used for each directory level, which allows users to identify how much space is consumed on a per-directory basis.

The "du" command can also be modified with various options, such as displaying sizes in a human-readable format (typically using the -h flag) or by summarizing total usage with the -s flag. This command is particularly useful for managing disk space and identifying any directories that may be consuming excessive storage.

Other commands related to disk space may not provide the same level of detail for directories. For example, "df" gives an overview of available and used disk space on mounted filesystems rather than specific directories. "ls" merely lists files and directories along with their basic attributes, while "ncdu" is a more advanced tool for analyzing disk usage interactively but is not as straightforward as "du" for simple queries.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy