LFCS Operation of Running Systems Practice Question
A Linux server's root filesystem is filling up quickly. You suspect that a user's process is writing a large log file and that the file has been deleted, but the space is still held. Which command will show the deleted file and the process holding it open?
⚠ Common exam trap
The trap here is assuming that df and du should always match; they diverge when deleted files are held open, and only lsof +L1 reveals the discrepancy.
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
✓
lsof +L1
The correct tool is lsof +L1, which specifically finds open files with a link count of zero, meaning they have been deleted but are still held open by a process. This is the standard method to identify the culprit consuming disk space invisibly to df and du.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
df -h
Why it's wrong here
df -h reports filesystem disk usage in human-readable format, showing total, used, and available space. It does not list individual open files or identify processes holding deleted files. While it confirms that space is consumed, it cannot pinpoint the specific deleted file or the process responsible.
- ✓
lsof +L1
Why this is correct
The lsof +L1 command lists open files with a link count less than 1, which indicates files that have been unlinked (deleted) but are still held open by a process. This directly reveals the deleted file and the process ID, allowing you to restart the process and reclaim space.
- ✗
du -sh /var/log
Why it's wrong here
du -sh /var/log estimates the disk usage of the /var/log directory. If a file has been deleted but still held open, du will not count its blocks because the directory entry is gone. Therefore, du may show less usage than df, but it will not identify the deleted file or the holding process.
- ✗
fuser -m /
Why it's wrong here
fuser -m / identifies processes using the root filesystem, but it does not distinguish between deleted and non-deleted files. It lists PIDs of processes with open files on that mount point, which could be many, and does not show which specific file is deleted or its size.
Go deeper
Related to this question
About these practice questions
Courseiva writes every LFCS question from scratch — 406 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 →
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 Linux Foundation exam blueprint
This LFCS practice question is part of Courseiva's free Linux Foundation 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 LFCS exam.