[Dirvish] Too much disk space for images

Przemek Klosowski przemek.klosowski at gmail.com
Fri Oct 2 12:19:03 UTC 2009


On Fri, Oct 2, 2009 at 6:18 AM, Dave Howorth <dhoworth at mrc-lmb.cam.ac.uk>wrote:

>
> I think if you ask du to tell you the size of just one particular
> snapshot, it will give you a realistic answer for what would be left if
> you deleted all the other snapshots. That's the easiest way to know the
> size that I'm aware of.
>

Right---it's worth remembering, and a little surprising at first, that 'du'
is not distributive ('du dirA dirB' is not necessarily 'du dirA' + 'du
dirB'). If we create two directories and hardlink files from one to the
other, we get:

du -h
1.1M    ./dirA
4.0K    ./dirB
1.1M    .

du -h dirA
1.1M    dirA

du -h dirB
1.1M    dirB

Note that you can't tell which directory is the 'owner' of the data: it's
simply counted against the first directory it's found in:

du -h dirB dirA
1.1M    dirB
4.0K    dirA

du -h dirA dirB
1.1M    dirA
4.0K    dirB
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.dirvish.org/pipermail/dirvish/attachments/20091002/b3355bc7/attachment.html 


More information about the Dirvish mailing list