Chris I just got this response from another list:
The df command will report all the available space on the disk , in other words it will report the number of blocks in the "free" list. The du command gives you and total number of blocks used by the directory that is passed to it as a parameter. The difference between the output is because du doesn't take into account the blocks taken by the directory itself, nor does it count the blocks used by the "special files" on the filesystem. Things like your device files etc. That is why du (in my experience) always reports less than df. Which is more or less what Alan said I think! HTH Stu ----- Original Message ---- From: Chris Rowson <[EMAIL PROTECTED]> To: British Ubuntu Talk <[email protected]> Sent: Thursday, 3 January, 2008 8:18:42 PM Subject: Re: [ubuntu-uk] df and du give different results > > Chris > > I have just done some testing as promised with the hidden trash folder on my > ntfs drive and found that both df -h and du -hs /* did not report the > changes in file sizes on the /media volume until I manually deleted the > files from it (therefore it would appear that both commands respond to > changes in hidden files at least when files are deleted from them). However > they were consistently 0.9 Gb adrift in the sizes they were reporting > despite the fact that the folder I was using for testing was a little under > 300 Mb. > > I am going to do some more testing as this happens to have some bearing on > my line of work. I will post back if I come up with anything > significant/relevant/interesting. > > If anyone out there can provide a full explanation of why/how this occurs I > would be very interested. I am sad enough that I find this kind of thing > fascinating :-) > > I hope you resolve your issue soon. > > Stu > Thanks for that Stu, Chris -- [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk https://wiki.kubuntu.org/UKTeam/ __________________________________________________________ Sent from Yahoo! Mail - a smarter inbox http://uk.mail.yahoo.com
-- [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk https://wiki.kubuntu.org/UKTeam/
