selective dirs only

Wayne Davison wayned at samba.org
Mon Jun 16 16:04:21 EST 2003


On Sun, Jun 15, 2003 at 09:16:22PM +1000, Res wrote:
> Ahh ok, I thought the -r would take care of all files and dirs under it.

The -r just gets it going, the exclude "*" excludes anything that
doesn't match something earlier in the list.  I personally prefer not to
use it in such a situation, I would do this instead:

  --include=/dir1/ --include=/dir2/ --exclude="/*"

That way the /* doesn't match anything down inside dir1 or dir2, and
thus you don't need all the extra wild-card rules.

..wayne..



More information about the rsync mailing list