The answer is `du -sh /*`, because when `df -h` reports the root filesystem at 100% capacity, the immediate next step is to identify which top-level directories are consuming the most space. The `du -sh /*` command calculates and displays the disk usage of every directory directly under `/`, allowing an administrator to quickly pinpoint space hogs like `/var/log` or `/tmp` before drilling down further. On the CompTIA Linux+ XK0-005 exam, this tests your understanding of the standard troubleshooting workflow: first check disk usage with `df`, then investigate with `du`. A common trap is running `du -sh /` instead, which sums the entire filesystem and gives a misleading total; the `/*` wildcard is critical to show each directory separately. Remember the mnemonic “Double-U Slash Star” — when your root is full, use `du -sh /*` to see where the trouble really is.
XK0-005 Troubleshooting Practice Question
This XK0-005 practice question tests your understanding of troubleshooting. Read the scenario carefully and evaluate each option against the stated constraints before committing to an answer. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.
Exhibit
Refer to the exhibit.
$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 20G 20G 0 100% /
/dev/sda2 50G 10G 40G 20% /home
tmpfs 1.9G 1.2M 1.9G 1% /tmp
The output of df -h shows the root filesystem at 100% capacity. Which of the following commands should the administrator run NEXT to identify the cause?
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
du -sh /*
The `du -sh /*` command calculates and displays the disk usage of each top-level directory in the root filesystem. When `df -h` shows 100% capacity, the next logical step is to identify which directories are consuming the most space, so the administrator can drill down further. This command is the standard tool for pinpointing space hogs before taking corrective action.
Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
✗
fdisk -l /dev/sda
Why it's wrong here
Shows partition table, not file usage.
✗
fsck /dev/sda1
Why it's wrong here
Checks filesystem integrity, not space usage.
✗
ls -la /
Why it's wrong here
Lists files but not sizes.
✓
du -sh /*
Why this is correct
Shows directory sizes to find space hogs.
Related concept
Read the scenario before looking for a memorised answer.
Common exam traps
Common exam trap: answer the scenario, not the keyword
CompTIA often tests the distinction between listing files (`ls`) and measuring disk usage (`du`), trapping candidates who think `ls -la /` will reveal space consumption when it only shows metadata and not recursive sizes.
Trap categories for this question
Command / output trap
Shows partition table, not file usage.
Detailed technical explanation
How to think about this question
The `du` command traverses the filesystem inode tree, summing the allocated blocks for each file and directory. Using the `-s` flag provides a total for each argument, and `-h` converts block counts to human-readable units (e.g., GiB). In practice, common space hogs include `/var/log` (rotated logs), `/tmp` (stale temporary files), or `/home` (user data). The `/*` glob expands to all top-level directories, but note that it may exclude hidden directories like `/root` or `/lost+found`; a more thorough approach would use `du -sh /[a-zA-Z]* /.[a-zA-Z]*` or `du -shx /` to stay within the same filesystem.
KKey Concepts to Remember
Read the scenario before looking for a memorised answer.
Find the constraint that changes the correct option.
Eliminate answers that are true in general but not in this case.
TExam Day Tips
→Watch for words such as best, first, most likely and least administrative effort.
→Review why wrong options are wrong, not only why the correct option is correct.
Key takeaway
Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
Real-world example
How this comes up in practice
A practitioner preparing for the XK0-005 exam encounters this exact type of scenario on the job. The correct answer here is not the most general option — it is the best answer for the specific constraint described. Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option. Real exam questions reward reading the full scenario before eliminating options, because the constraint defines which answer fits.
Related glossary terms
Concepts from this question explained
These glossary pages explain the core terms tested in this XK0-005 question in full detail.
Troubleshooting — This question tests Troubleshooting — Read the scenario before looking for a memorised answer..
What is the correct answer to this question?
The correct answer is: du -sh /* — The `du -sh /*` command calculates and displays the disk usage of each top-level directory in the root filesystem. When `df -h` shows 100% capacity, the next logical step is to identify which directories are consuming the most space, so the administrator can drill down further. This command is the standard tool for pinpointing space hogs before taking corrective action.
What should I do if I get this XK0-005 question wrong?
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
What is the key concept behind this question?
Read the scenario before looking for a memorised answer.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
This XK0-005 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-005 exam.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.