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

Paul Slootman paul at debian.org
Thu Dec 29 08:44:30 GMT 2005


On Thu 29 Dec 2005, Kfir Cohen wrote:

> 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.

This is a bogus argument.

"rsync /path//to/file wherever:" will work just fine, ignoring the
double slash. That is similar to what you're giving as examples.

However, the exclude is special, as it matches against a certain text.
Compare it to this:

$ find /etc -wholename /etc//passwd -print
$

That won't find anything either, simply because "find" will never find
a path with a double slash in it.


Just fix your script....


Paul Slootman


More information about the rsync mailing list