wildcards and nested files

Grant emailgrant at gmail.com
Wed Jul 3 03:00:17 MDT 2013


>>> 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 "- - "?
>
> Since excludes.txt is an --exclude-from file, the - is optional.
> Similarly, if you are using an --include-from file, the + is optional.
> These are both specializations of the generic --filter='merge filters.txt'
> filter option.  See the rsync man page for the gory details.

That's a great feature and I think it should be referenced in some way
under --include-from and --exclude-from in man rsync.

- Grant


More information about the rsync mailing list