excluding a directory without stating its contents?
Matt McCutchen
matt at mattmccutchen.net
Thu Nov 13 03:34:37 GMT 2008
On Tue, 2008-11-11 at 22:02 -0200, Carlos Carvalho wrote:
> I need to exclude a directory at the root of the sync tree. It's big,
> so it's important that both the source and destination don't waste
> time stating their contents. Should I use
>
> --exclude /dir
> or
> --exclude /dir/***
>
> or something else?
I would recommend the second option as the surest, though I would quote
the asterisks from the shell just to be safe. The first will also work
if you're recursing from the root of the tree because it short-circuits
rsync's recursion.
Matt
More information about the rsync
mailing list