/ full?
Steven Elling
ellings at kcnet.com
Mon Dec 2 18:22:41 CST 2002
On Monday 02 December 2002 00:20, Jim Herrmann wrote:
> Man, I'm learning some great commands here, but I still don't see why DU
> and DF don't match up.
I think the reason they don't match is because du asks the kernel for the
size of each file and df asks the kernel how many blocks are being used by
all the files on the file system.
By default when mke2fs is used to create a file system the block size is set
to 4096 typically. So as far as the space being used on the file system is
concerned, a 1 byte file will use up 4096 bytes on the file system. If you
have 1024 1-byte files, all the files will take up 4194304 bytes (4 Meg) on
the file system. This would explain why df always shows more space being
used as compared to du.
> Thanks for all the ideas. Anybody got any others?
Run tune2fs on you root partition and find out what the 'Block size' value
is:
tune2fs -l /dev/hda1
Hopefully, it is 4096 or lower. If it is higher, this could explain where
all your space has gone.
More information about the Kclug
mailing list