[Dirvish] Purgeing the evil data

Paul Slootman paul at debian.org
Sat Mar 22 10:32:23 UTC 2008


On Fri 21 Mar 2008, Petcher, Daniel wrote:
> 
> I see that there is a pile of data in my Dirvish archives that I should have
> excluded from backup. It's been sitting in my vault for months and it's
> wasting a heap o' disk space.
> 
> Is there a simple command that will unlink ALL the hard-links to a file and
> remove its data, or do I need to do something like this to iterate through
> all my images:

A dirty workaround could be to truncate each file in one of the images;
the result will be that the hardlinked files in the other images are
also truncated and hence don't take up any space anymore.

A cleaner way is indeed to remove each copy of that tree individually:

> for X in 'ls -1'
> do
>    rm -r $X/tree/path/to/evil/data
> done

I'd do:

    rm -r */tree/path/to/evil/data

or, if that gives "argument list too long":

    echo */tree/path/to/evil/data | xargs rm -r


Paul Slootman


More information about the Dirvish mailing list