[lug] exclude one file rsync

Sean Reifschneider jafo at tummy.com
Sun Nov 14 02:21:35 MST 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 11/12/2010 08:31 AM, Paul Nowosielski wrote:
> --exclude seems to be for directories
> or for pattern matching but it did not
> work for a single file name.

I don't think so, I use --exclude all the time and it works just fine.
For example, in one of my software projects where I have a .git directory:

   guin:python-psycopgwrap$ rsync -avn --exclude=.git . /tmp/
   sending incremental file list
   ./
   README
   psycopgwrap.py

   sent 90 bytes  received 21 bytes  222.00 bytes/sec
   total size is 8594  speedup is 77.42 (DRY RUN)

Then I tell it to exclude README as well:

   guin:python-psycopgwrap$ rsync -avn --exclude=.git --exclude=README . /tmp/
   sending incremental file list
   ./
   psycopgwrap.py

   sent 72 bytes  received 18 bytes  180.00 bytes/sec
   total size is 6670  speedup is 74.11 (DRY RUN)

Sean
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iD8DBQFM36oZxUhyMYEjVX0RAqvOAKCqGo9DCbjGwNcncVMYDOvo3YxIQACgnd+A
kjRCcTitHzrDuKPmvkj5oP0=
=o7RQ
-----END PGP SIGNATURE-----



More information about the LUG mailing list