XK0-005 · Question #110455000
XK0-005 Question #110455000: Real Exam Question with Answer & Explanation
The correct answer is A: lsof | grep largelogfile. {"question_number": 5, "question_summary": "Deleted a large file but disk space was not recovered", "correct_answer": "A", "explanation": "On Linux, deleting a file removes its directory entry, but the disk blocks are not actually freed until all open file descriptors referencing
Question
An administrator receives a warning about a file system filling up, and then identifies a large file located at /tmp/largelogfile. The administrator deletes the file, but no space is recovered on the file system. Which of the following commands would BEST assists the administrator in identifying the problem?
Options
- Alsof | grep largelogfile
- Bpkill /tmp/largelogfile
- Cpgrep largelogfile
- Dps -ef | grep largelogfile
Explanation
{"question_number": 5, "question_summary": "Deleted a large file but disk space was not recovered", "correct_answer": "A", "explanation": "On Linux, deleting a file removes its directory entry, but the disk blocks are not actually freed until all open file descriptors referencing that file are closed. If a process still has the file open, the kernel keeps the data on disk. 'lsof | grep largelogfile' lists all open file handles and filters for the deleted file, revealing which process is still holding it open. Once that process is identified and restarted or the file handle is closed, the space will be reclaimed. pkill and pgrep operate on process names, not file paths, and would not identify the correct process. ps -ef lists processes but does not show which files they have open.", "generated_by": "claude-sonnet", "llm_judge_score": 4}
Topics
Community Discussion
No community discussion yet for this question.