XK0-006 Troubleshooting Practice Question
A Linux administrator receives reports that a server's root filesystem is completely full. They run `df -h` and see that the root partition is at 100% usage. Which command should they use NEXT to identify which directories are consuming the most space?
⚠ Common exam trap
Test-takers frequently confuse disk usage reporting tools: `df` shows filesystem-level usage, while `du` shows directory-level usage, and only `du` can pinpoint the 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 -sh /* | sort -h
When a filesystem is full, the administrator must first identify which directories are consuming the most space. The `du` command with the `-s` and `-h` options provides a summary of disk usage per directory, and piping to `sort -h` orders the results by size. This quickly highlights the largest directories, enabling efficient troubleshooting.
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 -sh /* | sort -h
Why this is correct
The `du -sh /*` command calculates the total disk usage of each top-level directory and displays it in human-readable format, while `sort -h` orders the results by size. This directly identifies which directories are consuming the most space, allowing the administrator to drill down further. It is the most efficient next step for locating large directories on a full filesystem.
- ✗
fdisk -l
Why it's wrong here
`fdisk -l` lists the partition table and disk geometry, showing the size of partitions but not the usage within a partition. It does not help identify which directories or files are using space inside the root filesystem. Therefore, it is not useful for troubleshooting a full filesystem at the directory level.
- ✗
find / -type f -size +1G
Why it's wrong here
While `find / -type f -size +1G` can locate individual files larger than 1GB, it does not provide a summary of disk usage by directory. It may also take a long time to traverse the entire filesystem and can miss many smaller files that collectively consume significant space. This makes it less efficient for quickly identifying the top space consumers.
- ✗
ls -la /
Why it's wrong here
`ls -la /` lists the contents of the root directory with details such as permissions and ownership, but it does not show the cumulative disk usage of each directory. It only displays the size of directory entries themselves, which are typically small and not indicative of the total space used by files within them. Therefore, it cannot identify which directories are consuming the most space.
Go deeper
Related to this question
About these practice questions
One of 781 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 and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official CompTIA exam blueprint
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.