On Thursday June 4 2009, Ben Kevan wrote:
...
But a 4GB difference in reporting? That's massive.. When I get into work i'll check the trash, but I think someone may have moved a file that was open by an app. So it may still be loaded in the write buffers. I did lsof +L1 <directory> and noticed a file marked <deleted> that was 0 bytes.
That reminds me... A file can be "removed" (its directory entry(ies) unlinked) and du will be unable to find it, but if it was open at the time all those links were deleted the file will continue to exist, occupy space and be fully usable by any process(es) with a descriptor leading to that file. Only once all such references (in the form of open file descriptors) in running processes are closed will the space occupied by the file on disk disappear. Df will always reflect the true existence of such files (*) (the space they occupy) while du has no way of including them in its usage total. (*) I'd call them zombies—the term fits—but that word already has meaning: A process that has exited but whose parent process has not yet issued the "wait" call that returns the child process' exit status to the parent.
...
Randall Schulz -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org