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

Prepare for the LPIC-2 Certification Test with our study tools, including flashcards and multiple choice questions with hints and explanations. Get ready to pass your exam!

The command used to display disk usage in a human-readable format can indeed be represented by both 'du -h' and 'df -h'.

The 'du' command, which stands for "disk usage," is primarily used to estimate file space usage. When you use 'du -h', the '-h' flag makes the output human-readable, meaning it will provide sizes in a format that is easier to understand (e.g., showing sizes in kilobytes, megabytes, etc., instead of just bytes).

On the other hand, the 'df' command stands for "disk free." It provides a report on the amount of disk space used and available on file systems. Using 'df -h' also outputs the information in a human-readable format, which again translates the sizes into a more understandable form with units like KB, MB, and GB.

Thus, both commands serve distinct but related purposes and can output disk usage information in a way that is accessible and easy for users to read, making the option indicating both 'du -h' and 'df -h' as valid a correct choice.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy