excluding based on filesystem?

Wayne Davison wayned at samba.org
Wed Jan 19 23:36:41 GMT 2005


On Wed, Jan 19, 2005 at 04:09:32PM -0600, Danny Sauer wrote:
> Perhaps that should be amended to mention that this only happens when
> the pattern doesn't start with a '/'?

No, the matching you cited does happen with anchored patterns, it's just
not clear in that quote that when rsync is visiting "every subcomponent
of every path", that the strings that it is matching are not the
subcomponents in isolation, but the subcomponent relative to the base of
the transfer.  This means that for the file "/foo/bar/baz/file" rsync
matches all these subcomponents on the way down:

    /foo
    /foo/bar
    /foo/bar/baz
    /foo/bar/baz/file

The docs do say that an unanchored pattern floats to match at the end of
the string (so "baz" would match both "/baz" and "/foo/bar/baz", and
"*/baz" would match "/foo/baz" and "/foo/bar/baz", but not "/baz").

..wayne..


More information about the rsync mailing list