XK0-006 System Management Practice Question
Which command will display the disk usage of each directory in the current directory, in human-readable format?
⚠ Common exam trap
Watch out — candidates often confuse `df -h` (filesystem-level usage) with `du -h` (directory-level usage), often picking `df -h` because it also shows human-readable output.
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 displays disk usage for each directory in the current directory, with the `-h` flag converting sizes into human-readable formats (e.g., K, M, G). This is the correct tool for per-directory disk usage reporting.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
du -h
Why this is correct
du reports disk usage per directory, and the -h flag converts block counts into human-readable units such as KB, MB and GB. Running it in the current directory lists each subdirectory's consumption, matching the requirement for readable per-directory usage figures.
- ✗
fdisk -l
Why it's wrong here
fdisk -l lists partition tables and disk geometry; it reports no per-directory usage and has no human-readable size option. It is tempting because it is a disk-related command, so it would be the correct choice if the task were inspecting partition layout or adding a new partition to a block device.
- ✗
ls -lh
Why it's wrong here
ls -lh shows the size of each directory entry itself, which is typically 4096 bytes, not the recursive disk usage of its contents. It is tempting because -h gives human-readable output, so it would be correct if the task were listing file sizes rather than summing directory consumption.
- ✗
df -h
Why it's wrong here
df reports filesystem-level space for mounted volumes, not per-directory usage within the current directory. It is tempting because -h does produce human-readable sizes, so it would be the correct choice if the question asked about free space on mounted filesystems rather than the size of each subdirectory.
About these practice questions
This XK0-006 question is part of Courseiva's 781-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam 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.