[Techtalk] Different usage betweed df and du

Sue Stones suzo at spin.net.au
Wed Jul 13 16:21:50 EST 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?

du does include dot files, the response from du looks OK to me, and it 
is much more like I expected. I don't see that there is anyway that I 
could have 11GB on there, I only installed the OS on that disc a little 
while ago.

Mary wrote:

> Does du look at block sizes?


the man page offered an "apparent size" option which it said can be 
bigger "due to holes in files" but this produced the same result.

>
> If you can't find anything, and you think your home should just be 
> about 1 GB, I would say that the disk has a bad spot on it (not sure 
> what the correct terminology is), one that df thinks is being used, 
> but du doesn't find files in.  Have you had any problems with this 
> disk (other than problems caused by just being full)?  Do you have a 
> backup, and how much room does that take?  Might want to do backup and 
> run fsck.

Oh dear, I did smell a little burning last week, but couldn't find where 
it came from.  I don't really have a back up so that's not much help.  I 
had better make one though if this disc is about to fail.  I hope it 
lasts a bit longer, I can't afford to replace it at the moment.  This 
seems like the most likely option.

thanks.

sue







More information about the Techtalk mailing list