double / on --exclude flag cuse the path not to be excluded

Matt McCutchen hashproduct at
Wed Dec 28 21:15:07 GMT 2005

On Wed, 2005-12-28 at 14:52 -0500, Kfir Cohen wrote:
> thank you for your quick response.
> How can i ad this to your bugzilla project?
> --KC
> > rsync -aHvS --exclude /root//Desktop/ /root /tmp/kuku
> > the Desktop Dir will not be excluded.

Rsync is behaving correctly by not excluding /root/Desktop since this
folder does not match the double slashes in the exclude pattern.  This
is not a bug.  If, in writing a script, you need double-slash exclude
paths to match (single-slash) files, run the exclude paths through sed
-re 's./+./.g' or similar before passing them to rsync.
Matt McCutchen, ``hashproduct''
hashproduct at --

More information about the rsync mailing list