Linux interview question

The disk is full, but du shows far less usage than df. What's going on?

Scenario Asked in DevOps Engineer · Site Reliability Engineer (SRE) interviews

Members can save this page, take notes and track progress. See membership · Sign in

Summary

A process still holds open a file that was deleted (often a log rotated without the program reopening it). The space isn't freed until the file is closed, so df counts it but du can't see it. lsof +L1 lists open deleted files; restarting or signalling the process (or truncating via /proc/PID/fd/N) frees the space.

Keep reading with a membership

The full answer with examples, key points and comparisons is part of the membership, along with every other interview answer, progress tracking and Daily Review. Most-asked answers stay free to read.

See plans and free trial Already a member? Sign in

More Linux questions

← All Linux questions

Last reviewed · By the ByteCamel team · How we write content

Was this page helpful?

Report a mistake