wildcards and nested files
Kevin Korb
kmk at sanitarium.net
Wed Jul 3 11:39:27 MDT 2013
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
The way I think of it is that by default everything is included.
Excludes override that and remove certain paaterns. Includes override
that and put back in certain patterns.
On 07/03/13 05:55, Grant wrote:
>>>> Anyways, the other way to do what you are asking is: rsync
>>>> -azvi --exclude-from=excludes.txt --delete --delete-excluded
>>>> / user at hostname:
>>>>
>>>> excludes.txt: + / + /etc + /etc/** + /home + /home/*/ +
>>>> /home/*/.maildir/ + /home/*/.maildir/** - - *
>>>
>>> So the includes are in excludes.txt prefixed with "+ " and the
>>> excludes are prefixed with "- - "?
>>
>> I am not sure where the second - came from. That line should
>> have been "- *" as in exclude everything that I didn't explicitly
>> include previously (order matters). I find it much easier to
>> list both in a single file rather than using two since order is
>> so important.
>
> Is there a rule I can apply to figure out the proper order for
> includes and excludes? I found that:
>
> - /folder1/folder2
>
> needs to be above:
>
> + /folder1/**
>
> but "- *" needs to be at the very end which is confusing.
>
> - Grant
>
- --
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~
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.0.20 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iEYEARECAAYFAlHUYc8ACgkQVKC1jlbQAQdtlwCdFwsHu1/ylUgt0y7yHYT7E2DB
B+sAnRSA3fTCy5ATpSJm9spVe9d9sxds
=dttX
-----END PGP SIGNATURE-----
More information about the rsync
mailing list