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

Re: Disk usage



On Mon, Sep 03, 2007 at 02:07:01PM -0400, Daniel D Jones wrote:
> root@etch:/# du --max-depth=1 -h
> 1.7G    ./var
> 32K     ./tmp
> 4.0K    ./selinux
> 16K     ./lost+found
> 16M     ./boot
> 852K    ./home
> 0       ./sys
> 4.0K    ./initrd
> 22M     ./etc
> 81M     ./lib
> 515M    ./proc
> 6.3G    ./root
> 3.3M    ./sbin
> 3.7M    ./bin
> 8.0K    ./media
> 8.0K    ./mnt
> 208K    ./dev
> 4.0K    ./opt
> 1.3G    ./usr
> 4.0K    ./srv
> 9.7G    .
> 
> 
> root@etch:/# df -H
> Filesystem             Size   Used  Avail Use% Mounted on
> /dev/hda3               18G    17G    68M 100% /
> tmpfs                  265M      0   265M   0% /lib/init/rw
> udev                    11M    54k    11M   1% /dev
> tmpfs                  265M      0   265M   0% /dev/shm
> /dev/hda2              192M    22M   160M  13% /boot
> 
> Why is du telling me that I'm using 9.7G of the disk while df says I'm using 
> over 17G?  
> 
 
Try running 
/# du -c -h --max-depth=1 /*

The -c will give a grand total.  Without it, its telling you that you
have 9.7G in the root directory itself.  Also, use df -h.  -H is --si.
With one, multiples of a thousand are 1000, with the other they are
1024.  You may as well compare apples XOR oranges.

Doug.





Reply to: