du and df discrepancy
Pawel Jakub Dawidek
pjd at FreeBSD.org
Tue Oct 16 14:25:29 PDT 2007
On Tue, Oct 16, 2007 at 12:29:48PM -0400, Bill Vermillion wrote:
> du - shows the amount of blocks used by the system
> df - shows the amunt of space it thinks is being used.
>
> The latter will compute the length of sparse files so df
> will show less free space than du. Sparse file will have
> blocks of no data in them. These are typically created
> by database programs.
Please, verify before giving an answer. Neither du(1) nor df(1) include
sparse blocks in their calculations:
# ls -lh /mnt/tmp/foo
-rw-r----- 1 root wheel 10G 16 pa# 23:19 /mnt/tmp/foo
# df -h /mnt/tmp/foo
Filesystem Size Used Avail Capacity Mounted on
/dev/md0 9.4M 52K 8.6M 1% /mnt/tmp
--
Pawel Jakub Dawidek http://www.wheel.pl
pjd at FreeBSD.org http://www.FreeBSD.org
FreeBSD committer Am I Evil? Yes, I Am!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-fs/attachments/20071016/f660a550/attachment.pgp
More information about the freebsd-fs
mailing list