[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Rsync, how to include ~/.files but not ~/.dirs



On Fri, Jan 26, 2007 at 09:10:35AM -0900, Ken Irving wrote:
> On Fri, Jan 26, 2007 at 09:33:33AM -0800, Mike Bird wrote:
> > On Friday 26 January 2007 09:19, Ken Irving wrote:
> > > For some reason, .dir1/ is not excluded if the option is given as
> > > --exclude=/tmp/home/*/.*/ or --exclude=tmp/home/*/.*/.
> > 
> > Expansion of unquoted globs in keyword arguments
> > seldom gives the intended result.  e.g.
> > 
> > rsync --exclude=/home/*/.*/ /home/ /tmp/
> > 
> > might expand to:
> > 
> > rsync --exclude=/home/a/.x/ /home/a/.y/ /home/b/.x/ /home/b/.y/ /home/ /tmp/
> > 
> > which copies a lot more than presumably intended.
> > 
> > --Mike Bird
> 
> Duh... Thanks, I needed that.  The one that worked wouldn't match
> anything, so the globbing characters would pass through as is, but
> otherwise would expand as you say.   I've already deleted the test
> files, but I'm confident (well, sort of...) that those forms would work
> if quoted.

Well, tried that but they still don't work.  This is probably because
rsync is not dealing with the full paths (from /), so the longer patterns
just don't match.

Ken

-- 
Ken Irving, fnkci@uaf.edu



Reply to: