wildcards and nested files

Grant emailgrant at gmail.com
Tue Jul 2 13:25:39 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 "- - "?

If I want to rsync the /var/lib/portage/world file I should add the
following to excludes.txt?

+ /var
+ /var/lib
+ /var/lib/portage
+ /var/lib/portage/world

Also I think --delete-excluded implies --delete.

- Grant


More information about the rsync mailing list