I'm running rsync v2.5.5 on FreeBSD 4.6.2-RELEASE. I'm using rsync to mirror the home directories of user's desktop machines. I would like to exclude the cache of browsers such as mozilla or netscape. Unfortunately I have not been able to find the right syntax for the --exclude option. I hope someone can give me some insight. The command I'm using is: rsync --archive --cvs-exclude --exclude=.mozilla/**/Cache/ --exclude *.core --numeric-ids --relative --verbose /export/home/erin isengard::shadowfax An example of a file that I would like to exlcude is: /export/home/erin/.mozilla/default/4lizkxa3.slt/Cache/00FBBBF2d01 My hope was the exclude pattern .mozilla/**/Cache/ would prevent the Cache directory and all files within it from being copied. However, this is not the case and all files in the directory are being transfered. You're help is greatly appreciated. -- Scott
On Mon, Jul 28, 2003 at 01:21:38PM -0700, Scott Sewall wrote:> My hope was the exclude pattern .mozilla/**/Cache/ would prevent the > Cache directory and all files within it from being copied.This fails in the released versions of rsync due to a bug in the exclude code (though the CVS version has this fixed already). You can work around this bug in a number of ways, for instance, using this: --exclude=/*/.mozilla/**/Cache/ or this: --exclude=Cache/ This latter version would also exclude a "Cache" dir outsize of the .mozilla dir, which might not be acceptable to you. ..wayne..
Using "--exclude=/*/.mozilla/**/Cache/" works great. Thanks for your help. -- Scott Wayne Davison wrote:>On Mon, Jul 28, 2003 at 01:21:38PM -0700, Scott Sewall wrote: > > >>My hope was the exclude pattern .mozilla/**/Cache/ would prevent the >>Cache directory and all files within it from being copied. >> >> > >This fails in the released versions of rsync due to a bug in the exclude >code (though the CVS version has this fixed already). You can work >around this bug in a number of ways, for instance, using this: > > --exclude=/*/.mozilla/**/Cache/ > >or this: > > --exclude=Cache/ > >This latter version would also exclude a "Cache" dir outsize of the >.mozilla dir, which might not be acceptable to you. > >..wayne.. > > >