Re: [Hampshire] Baffled by df/du

Top Page
Author: Andy Smith
Date:  
To: hampshire
Subject: Re: [Hampshire] Baffled by df/du

Reply to this message
gpg: failed to create temporary file '/var/lib/lurker/.#lk0x57d00100.hantslug.org.uk.13535': Permission denied
gpg: keyblock resource '/var/lib/lurker/pubring.gpg': Permission denied
gpg: Signature made Mon Jan 15 18:24:22 2007 GMT
gpg: using DSA key 2099B64CBF15490B
gpg: Can't check signature: No public key
On Mon, Jan 15, 2007 at 05:18:44PM +0000, Mair wrote:
>
> > > du's 40 used blocks != 69516 Used in df
> > > I know there is a simple explanation, but what is it?
> > You need to run du -s /home/* to ensure everything gets counted
> > recursively under that directory, otherwise only top level files will
> > be accounted for.
>
> if you run du -s /home/*, you will want to add a -c and run du
> -sc /home/* to get the grand total. However, I don't believe you about
> this behaviour of du - why would using a * ensure it went any deeper
> into subdirectories? My du certainly recurses into subdirectories.


Correct. Use -x to prevent it spanning filesystems though (someone
else said to be wary in case there was a symlink or other fs mounted
there).

Cheers,
Andy

--
http://strugglers.net/wiki/Xen_hosting -- A Xen VPS hosting hobby
Encrypted mail welcome - keyid 0x604DE5DB

My words are my own and do not represent Jacqui Caren.