Trouble with include/exclude patterns

Wayne Davison wayned at
Thu Feb 6 12:50:56 EST 2003

On Thu, Feb 06, 2003 at 01:17:34AM -0000, Max Bowsher wrote:
> --include .mozilla
> --include .mozilla/arb/
> --exclude .mozilla/arb/*
> --include .mozilla/arb/kfgj0v2y.slt/
> --include .mozilla/arb/kfgj0v2y.slt/bookmarks.html
> --include .mozilla/arb/kfgj0v2y.slt/prefs.js
> --exclude .mozilla/arb/kfgj0v2y.slt/*

Close, but not quite.  The order of a couple lines is reversed and that
might copy more than one file from the .mozilla/arb dir.

I'd also suggest putting the lines into an include file so that the
command-line only needs an --include-from=file_name directive.  The
lines would get +/- prefixes to tell it what to include/exclude:

+ /rpm/SRPMS/
+ /rpm/.mozilla/
- /rpm/*
+ /rpm/.mozilla/arb/
- /rpm/.mozilla/*
+ /rpm/.mozilla/arb/kfgj0v2y.slt/
- /rpm/.mozilla/arb/*
+ /rpm/.mozilla/arb/kfgj0v2y.slt/bookmarks.html
+ /rpm/.mozilla/arb/kfgj0v2y.slt/prefs.js
- /rpm/.mozilla/arb/kfgj0v2y.slt/*

I _think_ that will work.


More information about the rsync mailing list