easyMultiple ChoiceObjective-mapped
XK0-006 Practice Question: A system administrator notices that a Linux…
A system administrator notices that a Linux server is running low on disk space. Which command should be used to identify which directories are consuming the most space?
⚠ Common exam trap
The trap here is that candidates often pick `df -h` (Option C) because it shows disk space usage, but it only reports filesystem-level totals, not per-directory breakdowns, which fails to identify the specific directories consuming space.
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 /path | sort -rh
The `du -h /path | sort -rh` command recursively calculates disk usage for each directory under the specified path, displays sizes in human-readable format (`-h`), and then sorts the output in reverse numerical order (`-rh`), showing the largest directories first. This directly identifies which directories are consuming the most space, which is exactly what the system administrator needs.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
ls -laR
Why it's wrong here
ls -laR lists all files recursively but does not aggregate sizes per directory.
- ✗
find / -size +100M
Why it's wrong here
find with -size finds large files, not directory total sizes.
- ✗
df -h
Why it's wrong here
df shows filesystem disk space usage, not per-directory usage.
- ✓
du -h /path | sort -rh
Why this is correct
du with -h and sort -rh lists directories with human-readable sizes sorted largest first.
Go deeper
Related to this question
Learn chapter
Linux Fundamentals and History
Key term
Output
In IT service management, output is the result or deliverable produced by a process, system, or component, such as data, reports, or services delivered to a customer.
Key term
Linux
Linux is an open-source operating system that manages computer hardware and software, widely used in servers, desktops, and embedded systems.
About these practice questions
One of 979 original XK0-006 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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.