Courseiva
easyMultiple Choice

XK0-006 Practice Question: That the /home partition is running out of space

A user reports that the /home partition is running out of space. Which command identifies the largest directories under /home?

⚠ Common exam trap

Candidates often confuse `df` (filesystem-level usage) with `du` (directory-level usage), or assume `ls -lhS` or `find -size` can accurately report directory disk consumption, when only `du` correctly accounts for all nested file contents.

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 /home/*

`du -sh /home/*` calculates the disk usage of each top-level item under /home, with `-s` summarizing each directory and `-h` providing human-readable sizes. This directly identifies the largest directories consuming space, which is exactly what the user needs to troubleshoot the /home partition running out of space.

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 /home/*

    Why this is correct

    du -sh /home/* reports the total disk usage of each immediate entry under /home in human-readable form, revealing which directories consume the most space. This directly identifies the largest directories, satisfying the reported out-of-space constraint.

  • ✗

    df -h /home

    Why it's wrong here

    df reports filesystem-level usage and mount points, so it shows /home is full but not which directories consume the space. It is the right tool for confirming capacity or inode exhaustion across mounted filesystems, not for drilling into directory sizes.

  • ✗

    ls -lhS /home

    Why it's wrong here

    ls -lhS lists files sorted by size within a single directory and does not recurse, so nested directories under /home stay hidden. It suits inspecting the largest files in one known folder, whereas du -h --max-depth or sort recurses to reveal directory totals.

  • ✗

    find /home -type d -size +100M

    Why it's wrong here

    find matches directories whose own inode size exceeds 100M, which rarely reflects content held beneath them, and it prints paths without totals. It is correct for locating individual large files or directories by attribute, not for ranking directory consumption.

About these practice questions

Courseiva writes every XK0-006 question from scratch — 781 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 →

How Courseiva writes practice questions · Editorial policy

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.