du and df giving different output

9 Jun 2017

This is because the file is deleted but some processes haven't closed the file yet.

So, these deleted files are still maintained in the directory, and du doesn't read these ghost files.

We can see those ghost files with lsof -nP | grep deleted.