Request for exclude syntax assistance

David Favor david at
Thu May 22 18:46:01 GMT 2008

I'm baffled by exclude syntax. I'm mirroring CPAN and am trying to
exclude all files in the src/ directory. I've tried for days to figure
this out and now throwing myself on the mercy of this list.

Here's my current incantation:

    /usr/bin/rsync -av --delete --exclude '/src/**' --delete-excluded \
       --prune-empty-dirs /cpan-mirror/

I've tried 'src', 'src/', '*src*', 'src/***'.

Someone straighten me out. Thanks.


Using rsync version:

rsync  version 3.0.1  protocol version 30
Copyright (C) 1996-2008 by Andrew Tridgell, Wayne Davison, and others.
Web site:
     64-bit files, 64-bit inums, 32-bit timestamps, 64-bit long ints,
     socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace,
     append, ACLs, xattrs, iconv, symtimes

Love feeling your best ever, all day, every day?
Click for the easy way.

More information about the rsync mailing list