[Techtalk] Different usage betweed df and du

Mary mary-linuxchix at puzzling.org
Wed Jul 13 15:52:15 EST 2005


On Tue, Jul 12, 2005, Maria McKinley wrote:
> df is usually pretty straightforward and looks for free space, ie. if it 
> says, so much used on such a disk, I'd trust it.  du works by going 
> through directories and adding up file sizes, so I'm guessing it is 
> missing something somewhere.  I'm not sure if du looks at dot files, so 
> maybe there is a .trash somewhere that is really full?

Does du look at block sizes? If it doesn't that could mean a
discrepency, because even if a file is 2 bytes long, an entire block of
the filesystem will be unavailable so df will report it used.

Unless you have lots and lots and lots of tiny files though, I can't see
that accounting for a 5x difference.

-Mary


More information about the Techtalk mailing list