Re: du and df Used Space Inconsistent On Fresh Install
On Fri, 31 Mar 2006 16:52:57 +1100, Cameron Hutchison wrote:
> In list.debian.user you write:
[...]
> >df says ~340Mb used
> >du says ~830Mb used
> >that's quite a difference ....
>
> Doinig a du from / is going to include all filesystems, not just
> /dev/hda8. In particular /proc is going to be included and as the size
> of /proc/kcore is equal to the amount of memory in the box, that could
> add a sizable chunk to the difference.
>
> Try:
> # du -skx /
>
> The -x restricts du to one file system.
Ah ! That gives this :
# du -skx /
311184
which is a much "better" figure. I guess the ~30000 Kb that du has
"missing", compared with df, might be the ext3 journal (since du
counts visible files and directories AIUI).
BTW: the box has 512Mb RAM, which is close to but not exactly the same
as the difference between the original 340Mb and 830Mb. Still, it
looks like /proc (and /sys and /dev) must have been the cause of the
discrepancy - thanks very much.
Nick Boyce
Bristol, UK
--
You are in a maze of twisty political parties, all alike.
Reply to: