wildcards and nested files
Grant
emailgrant at gmail.com
Wed Jul 3 02:49:07 MDT 2013
>>> 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.
> Especially if you have multiple sets of includes and excludes.
I couldn't agree more. May I suggest that the man page make reference
to this feature under --include-from and --exclude-from ?
> I also added a -i (--itemize-changes) because I am trying to generate
> a habit of always pairing it with -v since -v isn't all that useful
> without it.
Nice, I'm loving -i now. Thank you for your help!
- Grant
More information about the rsync
mailing list