rsync exclude/include

Dave Dykstra dwd at bell-labs.com
Wed Nov 14 03:41:22 EST 2001


On Tue, Nov 13, 2001 at 10:00:59AM -0600, Dave Dykstra wrote:
...
> A simplification is this:
> 
>     + /iso
>     + /iso/1.5.*
>     + /iso/1.5.*/i386*
>     - *
> 
> because if you don't have the slash preceding the exclude "*" it applies at
> all levels.

Wait, if i386* matches directories and not just files you'll need

    + /iso
    + /iso/1.5.*
    + /iso/1.5.*/i386**
    - *

so that it will include all files below the i386* directories.  Any double
asterisk in a pattern tells the matching routine to go beyond slashes.

- Dave




More information about the rsync mailing list