How to discern when like dir names exist in 2 places
Kevin Korb
kmk at sanitarium.net
Mon Apr 13 11:45:18 MDT 2015
-----BEGIN PGP SIGNED MESSAGE-----
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:
INCLUDE/EXCLUDE PATTERN RULES
...
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 inria.fr 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 FutureQuest.net (work)
Orlando, Florida kmk at sanitarium.net (personal)
Web page: http://www.sanitarium.net/
PGP public key available on web site.
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iEYEARECAAYFAlUsAK4ACgkQVKC1jlbQAQeCAQCeIiW4DaQHh41XAbbIRjUqUmfG
5dUAn3w7EpsV99alLhUffL/m2H69iDnU
=EL0B
-----END PGP SIGNATURE-----
More information about the rsync
mailing list