[Techtalk] Different usage betweed df and du
Maria McKinley
maria at shadlen.org
Wed Jul 13 15:49:00 EST 2005
Wow, that is a pretty significant difference. I'm not sure this is very
helpful, but maybe will give you some ideas.
I guess one of the first thing I would do is look at the subdirectories
of /home using du and see if they make sense. I'm assuming you are
looking at du using something like:
du -h -d=1 /home
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?
Which number feels more accurate? Do you think you should have about
1GB used or 11GB? That would be useful to know when looking for big
files (whether they are likely to be hidden in a trash directory, for
example).
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.
good luck,
maria
Sue Stones wrote:
> I received a message saying that /home is full. (I deleted some stuff
> so that I can get some work done.)
>
> When I run "df" it tells me that I have used 9.4 of my 11GB on /home
> (before I deleted stuff it said I had used 11G)
>
> When I run "du" it tells me that /home has used 1.1GB.
>
> What it the likely cause of this difference? How do I go about sorting
> it out?
>
> Thanks to anyone who can help.
>
> sue
>
> _______________________________________________
> Techtalk mailing list
> Techtalk at linuxchix.org
> http://linuxchix.org/cgi-bin/mailman/listinfo/techtalk
More information about the Techtalk
mailing list