Subject: Re: df doesn't show update informations
To: Dante Profeta <dante@mclink.it>
From: Todd Whitesel <toddpw@best.com>
List: netbsd-help
Date: 10/11/1998 17:54:58
> I deleted a very huge file which was using about 60% of a partition
> space.
> After a while I did re-run df to see how much disk space I saved, but it
> didn't show me updated informations. It still showed a 90% of partition
> usage.

Run 'du /disk | xdu' from X11 and see if your huge file shows up. If it
does, then you have other directory entries hard-linked (by 'ln') to that
file and those names will need to be deleted also.

If your huge file does not show up in the 'du' output, then another process
still has the file open. Perhaps there is a 'tail -f' running on it. Hunt
down (with 'lsof' if you have it, or 'ps' if you don't) and kill processes
that would have been using the file, and that should do it.

> I guess this is due to the file system caching mechanism... so, is it
> normal? Is there a way to force df to flush the cache?

Files can be kept allocated on disk because of directory entries and
open file descriptors. Eliminate all of those, and the file goes away.

Todd Whitesel
toddpw @ best.com