[NTLUG:Discuss] disk space mystery

Alton Pouncey arpounce at earthlink.net
Sat Aug 14 15:34:08 CDT 1999


The discrepancy comes fromt he difference between the df and du commands.
du gives you disk usage for a filesystem.  df gives you disk free space.
If you cd to "/" and do a df -k then you should get the information you
want (in kilobytes) for all the filesystems on the machine.

df -k will tell you what the entire size of the partition is, how much is
used, and how much you have left.

The results you got for du -Sx mean you're using 60M on that filesystem,
not that 60M is what you have available.

Alton Pouncey

Kevin Brannen wrote:

> For all you sleuths out there, here's one for you that's puzzling me...
>
> When I do a "df /"  I get:
>
>             1024-blocks   Used      Available
> /dev/hda6   893363        829768    17010          /
>
> and I'm thinking, "where did it all go?", so I do:
>
> tar -clf - / | wc -c        and get ~62M
> du -Sx                      and get 59810
> du -s /*  (and sum the non-mount points) and get ~60M
> fsck -n /dev/hda6           and get 860417 blocks used
>                                      58201 inodes
>                                       5135 reg. files
>                                       2554 dirs
>                                      ~3000 other file types
>
> Umm, which is it?  About 60M or 830M?  Why the descrepency?   Nope,
> nothing in lost+found.  usr, var, home, opt are all on other
> partitions.  /tmp isn't that big.  Yes, I'm doing this all as root, so
> no "permission denied" messages because I can't look into various
> places.
>
> What am I overlooking?
>
> Kevin
>
> _______________________________________________
> http://ntlug.org/mailman/listinfo/discuss





More information about the Discuss mailing list