Trouble with include/exclude patterns
Anand Buddhdev
arb at anand.org
Thu Feb 6 21:22:46 EST 2003
On Thu, Feb 06, 2003 at 01:58:28AM -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
>
> Duh. Thanks for picking up on that.
>
> > that might copy more than one file from the .mozilla/arb dir.
>
> It would copy nothing from arb, surely?
>
> > 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:
>
> I don't think .mozilla was in rpm:
>
> + /rpm/SRPMS/
> - /rpm/*
> + /.mozilla/
> + /.mozilla/arb/
> - /.mozilla/*
> + /.mozilla/arb/kfgj0v2y.slt/
> - /.mozilla/arb/*
> + /.mozilla/arb/kfgj0v2y.slt/bookmarks.html
> + /.mozilla/arb/kfgj0v2y.slt/prefs.js
> - /.mozilla/arb/kfgj0v2y.slt/*
This works just as I wanted it to :) Now I also understand the
exclude/include logic better. Thanks guys!
--
Anand Buddhdev
http://anand.org
More information about the rsync
mailing list