What command can be used to view the disk usage of a directory?

Prepare for the Linux Professional Institute Certification Level 1. Use flashcards and multiple choice questions, complete with hints and explanations. Enhance your understanding and get ready to ace the exam!

The command used to view the disk usage of a directory is "du." This command stands for "disk usage" and is specifically designed to estimate the file space usage of directories and their contents. When you use "du" followed by a directory name, it will recursively calculate the total disk space used by that directory and its subdirectories, which can provide valuable insights into storage consumption.

In contrast, "df" is a command that displays the overall disk space usage of mounted filesystems rather than specific directories. It provides a summary of the amount of disk space used and available on each filesystem.

The term "usage" does not correspond to a standard command in Linux related to disk usage, while "diskutil" is not typically found on Linux systems; it may refer to disk management utilities in macOS, thus making it irrelevant in the context of this question. Therefore, "du" is the appropriate choice for viewing disk usage of directories in a Linux environment.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy