anchoring of patterns for per-directory merge files
Andy Smith
andy at strugglers.net
Wed Nov 11 11:12:53 MST 2009
On Wed, Nov 11, 2009 at 05:59:29PM +0000, Andy Smith wrote:
> On Wed, Nov 11, 2009 at 06:43:33PM +0100, Paul Slootman wrote:
> > From the manpage:
> >
> > The following modifiers are accepted after a “+” or “-”:
> >
> > o A / specifies that the include/exclude rule should be matched
> > against the absolute pathname of the current item. For example,
> > “-/ /etc/passwd” would exclude the passwd file any time the
> > transfer was sending files from the “/etc” directory, and “-/
> > subdir/foo” would always exclude “foo” when it is in a dir named
> > “subdir”, even if “foo” is at the root of the current transfer.
> >
> > Hence, your dir-merge setup causes only the absolute path /tmp/ to be
> > excluded. If you want to exclude /data/home/andy/tmp/ then put that in
> > your .rsync-filter .
>
> Neither "-/ /data/home/andy/tmp/" nor "- /data/home/andy/tmp/" nor
> "-/ /home/andy/tmp/" match. (I'd already tried the middle one,
> anyway)
"-/ tmp/" works though, and does only exclude exactly what I want.
Cheers,
Andy
More information about the rsync
mailing list