What command would you use to check disk usage of files and directories?

Prepare for the LPI 101-500 Test. Study with flashcards and multiple-choice questions. Each query includes hints and explanations for thorough preparation. Ace your exam with confidence!

Multiple Choice

What command would you use to check disk usage of files and directories?

Explanation:
The command used to check disk usage of files and directories is "du." This utility stands for “disk usage” and is designed specifically for this purpose. When you run the "du" command, it provides a summary of disk usage for each file and directory in the specified path. By default, "du" displays the sizes of items in kilobytes, but it can be modified to show the information in a more user-friendly manner with options such as "-h" for human-readable format, which presents the sizes in a more understandable form like megabytes (M) or gigabytes (G). In contrast, the command "df" is used for checking available disk space on file systems but does not provide detailed information per file or directory. The options "diskusage" and "checkdisk" are not standard Linux commands, which means they would not be recognized by the system. Thus, "du" is the most suitable and correct choice for checking the disk usage of files and directories.

The command used to check disk usage of files and directories is "du." This utility stands for “disk usage” and is designed specifically for this purpose. When you run the "du" command, it provides a summary of disk usage for each file and directory in the specified path.

By default, "du" displays the sizes of items in kilobytes, but it can be modified to show the information in a more user-friendly manner with options such as "-h" for human-readable format, which presents the sizes in a more understandable form like megabytes (M) or gigabytes (G).

In contrast, the command "df" is used for checking available disk space on file systems but does not provide detailed information per file or directory. The options "diskusage" and "checkdisk" are not standard Linux commands, which means they would not be recognized by the system. Thus, "du" is the most suitable and correct choice for checking the disk usage of files and directories.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy