How to discern when like dir names exist in 2 places

Kevin Korb kmk at
Mon Apr 13 11:45:18 MDT 2015

Hash: SHA1

I was actually in the include/exclude section of the man page not the
filter section.  However, your syntax does work.

The +/- syntax absolutely works in an --exclude-from or --include-from
file I use it all the time.  However, apparently the -/ syntax does
not work there.

So, I am not sure if the man page is wrong or if this feature just
isn't working correctly in an exclude file.

- From the man page:
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.

On 04/13/2015 01:34 PM, Francis.Montagnac at wrote:
> Hi,
> On Mon, 13 Apr 2015 12:59:07 -0400 Kevin Korb wrote:
>> Hmmm,  according to my interpretation of the man page (I am on
>> 3.1.1) that is supposed to work however when I test using the
>> "-/ /etc/passwd" example the / seems to have the same effect as
>> commenting the line.  I get /etc/passwd copied whether the source
>> is / or /etc.
> I guess that this -/ syntax is not usable with --exclude, but only 
> with --filter.
> Try thus to modify your exclude file to:
> - /pkg/* - /sadm/* - /cache/* - /opt/csw/cache/* -/ /var/apache2/* 
> - /tmp/*
> an call rsync ... --filter='merge YOUR_FILE'
> Francis

- -- 
	Kevin Korb			Phone:    (407) 252-6853
	Systems Administrator		Internet:
	FutureQuest, Inc.		Kevin at  (work)
	Orlando, Florida		kmk at (personal)
	Web page:
	PGP public key available on web site.
Version: GnuPG v2


More information about the rsync mailing list