RHEL Linux - Red Hat System Administration Practice Exam

Disable ads (and more) with a membership for a one time $4.99 payment

Study for the RHEL Linux - Red Hat System Administration Exam. Enhance your knowledge with flashcards and multiple-choice questions, complete with hints and explanations. Prepare for your certification!

Practice this question and more.


What is the command to display disk usage in a human-readable format?

  1. du -h

  2. df -h

  3. ls -lh

  4. stat -h

The correct answer is: du -h

The command to display disk usage in a human-readable format is indeed constructed using "du -h". The "du" command, which stands for disk usage, is used to estimate file space usage on a filesystem. When used with the "-h" option, the sizes are output in a format that is easier to read; specifically, it converts the byte counts into a more manageable format using KB, MB, GB, etc. This makes it straightforward for users to understand the amount of disk space being used without needing to interpret large numbers directly. It is important to note that "df -h" is a command as well, but it serves a different purpose. While "df" reports on the amount of disk space used and available on filesystems, it encompasses the entire filesystem rather than individual files or directories, even though it also includes a human-readable option. The "ls -lh" command shows the size of files in a human-readable format in a directory listing, but it doesn't specifically report on disk usage for directories or files in the same way "du" does. Lastly, "stat -h" is not a standard command that relates directly to disk usage or displays it in a human-readable format; instead, "stat" is used