Include / exclude patterns

Max Bowsher maxb at
Thu Nov 28 19:03:01 EST 2002

Carlos Molina <cmolina at> wrote:

> Nope, isn't works, because rsync only fetchs /etc directory.
> On the output, you could see that /home nad /var is excluded (I
> suppose that is excluded by /* pattern)

Blah. Your right. This will work:

+ /etc
+ /home
+ /home/cmolina
- /home/*
+ /var
+ /var/spool
- /var/*
- /*

> Can you explain me with more detail what you refer with "
> The / in /* anchors to the toplevel.
> "

/* will match <root-of-rsync>/foo, but not <root-of-rsync>/foo/bar.
Of course, (and this is what I forgot), if <root>/foo is excluded, then
rsync will never bother to look inside at <root>/foo/bar.


More information about the rsync mailing list