[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: df returning inaccurate results



On Sun, Feb 23, 2003 at 06:26:42PM -0600, Caitrin Torres wrote:
> I noticed today that df is not returning correct results. I saw that I was low 
> on disk space so I deleted two files from my home directory that together 
> were taking up nearly 1GB and then reran df. It returned the same numbers as 
> from before I deleted files. To wit:
> 
> $df -h
> Filesystem    Size    Used    Avail    Use%    Mounted on
> /dev/hda5     2.8G    1.8G    939M     66%     /
> /dev/hda7     10G     8.8G    822M     92%     /home
> 
> What confuses me is that du returns a very different number which *does* 
> reflect the fact that I've deleted files.
> 
> $du -csh /home/*
> 7.9G    /home/cait
> 7.9G    /total
> 
> What can be causing this?

Were the files still in use (like many logfiles would be) when you
removed them? If so, they'll exist on disk until they're closed so
they'll keep using up space, but there won't be a directory entry for
them anymore so du won't show them.

-- 
Michael Heironimus



Reply to: