XK0-006 System Management Practice Question
Which command displays the disk usage of files and directories in a human-readable format (e.g., KB, MB)?
⚠ Common exam trap
Many candidates confuse `df -h` (filesystem-level free space) with `du -h` (per-file/directory disk usage), or assume `ls -lh` shows disk usage when it actually shows logical file size, not the blocks consumed on disk.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
du -h
The `du -h` command (disk usage with human-readable flag) recursively summarizes disk usage for files and directories, appending size suffixes like K, M, G for kilobytes, megabytes, and gigabytes. This directly matches the question's requirement to display disk usage in a human-readable format.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
df -h
Why it's wrong here
df -h shows filesystem disk space usage, not file/directory usage.
- ✗
ls -lh
Why it's wrong here
ls -lh lists file sizes but does not aggregate directory usage.
- ✗
stat -h
Why it's wrong here
stat does not have a -h option for human-readable; it shows detailed metadata.
- ✓
du -h
Why this is correct
du -h shows disk usage of files/directories with human-readable sizes.
Go deeper
Related to this question
About these practice questions
Courseiva writes every XK0-006 question from scratch — 979 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This XK0-006 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the XK0-006 exam.