double / on --exclude flag cuse the path not to be excluded
kfirc at qlusters.com
Thu Dec 29 05:26:13 GMT 2005
Matt McCutchen wrote:
> 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?
>>> 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.
Almost all application and binaries on linux discount the double slashes.
try to change dir with double slash or even tar cp , they all dont car
how much slash you have. if there are two slashes and there no dir
between them they remove on of the slash.
More information about the rsync