Question 16 of 510
TroubleshootingmediumMultiple ChoiceObjective-mapped

Quick Answer

The answer is a process holding a deleted file open, which causes the df vs du discrepancy where a deleted file held open by a process still consumes disk space. When a file is deleted but a running process retains an open file descriptor to it, the kernel does not release the inode or its associated data blocks until that descriptor is closed; `df` reads the filesystem superblock and counts those blocks as used, while `du` walks the directory tree and cannot see the unlinked file, so it reports less usage. On the CompTIA Linux+ XK0-005 exam, this scenario tests your understanding of filesystem internals and process management, often appearing as a troubleshooting question where `df -h` shows 100% but `du -sh /` shows only 50%. A common trap is assuming disk corruption or a full inode table, but the real culprit is a zombie file held open by a process like a log writer or database. Remember the mnemonic: “df sees the dead, du sees the directory.”

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.

A server shows /dev/sda1 mounted at / is 100% full in df -h, but du -sh / shows only 50% usage. What is the most likely explanation?

Clue words in this question

Noticing these words before you look at the options changes how you read each choice.

  • Clue: "most likely"

    Why it matters: Probability qualifier — the question wants the most probable cause or outcome, not a guaranteed one. Eliminate low-probability options.

Question 1mediummultiple choice
Read the full NAT/PAT explanation →

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

A process is still holding a deleted file open

When a file is deleted but still held open by a running process, the file's inode remains allocated and its disk blocks are not freed until the process closes the file descriptor. The `df` command reports filesystem usage by querying the superblock for total and free blocks, so it still counts the space occupied by the deleted-but-open file. In contrast, `du` traverses the directory tree and sums the sizes of files reachable from the specified path; since the deleted file is no longer linked in the directory, `du` does not include it, leading to the discrepancy.

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.

  • The filesystem is corrupted

    Why it's wrong here

    Corruption would typically cause errors in both df and du.

  • Hidden files are not counted by du

    Why it's wrong here

    du counts all files, including hidden, by default.

  • A process is still holding a deleted file open

    Why this is correct

    Deleted files held open by processes continue to occupy space until the process releases them.

    Clue confirmation

    The clue word "most likely" in the question point toward this answer.

    Related concept

    Read the scenario before looking for a memorised answer.

  • The disk has many hard links

    Why it's wrong here

    Hard links do not consume extra disk space.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates assume `du` and `df` should always match, and they overlook the classic Linux behavior where a file deleted while still open consumes space invisible to `du` but visible to `df`.

Detailed technical explanation

How to think about this question

Under the hood, when a file is unlinked (deleted) but still open, the kernel's VFS layer decrements the link count in the inode but does not release the data blocks until the file descriptor count reaches zero. The `df` command reads the filesystem's superblock, which tracks allocated blocks via the block bitmap, while `du` uses the `stat()` system call on each directory entry; the deleted file has no directory entry, so `du` cannot see it. A real-world scenario is a log file that is rotated or deleted while a daemon (e.g., syslog-ng or Apache) still holds it open, causing the disk to fill up even though no file appears in `ls -la`.

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 small business has 20 workstations on the 192.168.1.0/24 network and one public IP from its ISP. The router uses PAT (NAT overload) so all 20 devices share one public address using different source ports. NAT questions test whether you understand the four address terms and which direction each translation applies.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related XK0-005 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free XK0-005 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this XK0-005 question test?

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: A process is still holding a deleted file open — When a file is deleted but still held open by a running process, the file's inode remains allocated and its disk blocks are not freed until the process closes the file descriptor. The `df` command reports filesystem usage by querying the superblock for total and free blocks, so it still counts the space occupied by the deleted-but-open file. In contrast, `du` traverses the directory tree and sums the sizes of files reachable from the specified path; since the deleted file is no longer linked in the directory, `du` does not include it, leading to the discrepancy.

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.

Are there clue words in this question I should notice?

Yes — watch for: "most likely". Probability qualifier — the question wants the most probable cause or outcome, not a guaranteed one. Eliminate low-probability options.

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 →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 25, 2026

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.

Loading comments…

Sign in to join the discussion.

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.