Re: du showing more disk usage than df
- From: Lew Pitcher <lpitcher@xxxxxxxxxxxx>
- Date: Thu, 29 Apr 2010 15:47:48 -0400
On April 29, 2010 14:18, in comp.os.linux.setup,
unruh@xxxxxxxxxxxxxxxxxxxxxxx wrote:
On 2010-04-29, bzaman <bzaman.laskar@xxxxxxxxx> wrote:
Hi ,
Surprisingly , the du command in my desktop is showing more disk usage
than df . I came across systems where df command shows more disk usage
than du because df includes metadata information about partition and
also considers disk space consumed by files which are removed but not
yet released by some process .
=====
$ sudo du -sh /
13G /
$ sudo df -h /
Filesystem Size Used Avail Use% Mounted on
/dev/md0 9.5G 8.1G 903M 91% /
---
$ sudo df -h /usr/
Filesystem Size Used Avail Use% Mounted on
/dev/sda5 8.6G 4.6G 3.6G 56% /usr
$ sudo du -sh /usr/
5.0G /usr/
Sparse files? du uses the size in the directories to add up the total
used. A sparse file may show a size of 2GB but only consume 1K of the
disk space.
Also
1) du includes filespace "reserved" for root, but df doesn't
2) du doesnt include the space in "deleted" files (files without inodes)
but df does
======
Can somebody explain why this discrepancy in df and du results .
Thanks in Advance
Badiuzzaman
--
Lew Pitcher
Master Codewright & JOAT-in-training | Registered Linux User #112576
Me: http://pitcher.digitalfreehold.ca/ | Just Linux: http://justlinux.ca/
---------- Slackware - Because I know what I'm doing. ------
.
- Follow-Ups:
- Re: du showing more disk usage than df
- From: Lew Pitcher
- Re: du showing more disk usage than df
- References:
- du showing more disk usage than df
- From: bzaman
- Re: du showing more disk usage than df
- From: unruh
- du showing more disk usage than df
- Prev by Date: Re: du showing more disk usage than df
- Next by Date: Re: du showing more disk usage than df
- Previous by thread: Re: du showing more disk usage than df
- Next by thread: Re: du showing more disk usage than df
- Index(es):
Relevant Pages
|