Exclude directories

Wayne Davison wayned at users.sourceforge.net
Fri Feb 15 03:48:53 EST 2002


On Wed, 13 Feb 2002, Ian Kettleborough wrote:
> ie:
> /usr/src
> or
> /usr/src/

One thing that totally tripped me up at first is that you don't include
the whole path if you're not starting the transfer from the root of the
filesystem.  For instance:

    rsync -av /usr/ foobar:/usr

All your excludes would be relative to /usr/, so you'd use /src/ to
exclude /usr/src/.  If you use verbose mode to see the names that rsync
is sending, the names you must put in your include/exclude items need to
match those (with an added starting slash to anchor the match).

..wayne..





More information about the rsync mailing list