Recursive filetype include

Mark Palatucci markmp at copera.com
Sat Mar 15 10:04:21 EST 2003


Hi Max,

The exact line is:

/usr/local/bin/rsync --rsh=ssh -azvv --delete --force --include
'cpp/*.htm' --exclude '*.htm' --exclude "CVS*" --exclude 'Makefile'
--exclude '*.sh' --exclude '*.psd' $localdir/ user at ourhost.com:www/ 


This gets .htm's in cpp/, but not in dirs like cpp/foo/ or cpp/bar/


-M




On Fri, Mar 14, 2003 at 10:49:03PM -0000, Max Bowsher wrote:
> Mark Palatucci wrote:
> > Hello,
> >
> > I have a directory tree that contains many files of type .htm. I don't
> > want these when I rsync - so I used the option --exclude '*.htm'
> >
> > There is however, one subdirectory (and all of its subdirectories)
> > that I would like to include these .htm files.
> >
> > I tried using many variations of --include 'subdir/*.htm' but this
> > does not seem to work. It includes the .htm's in the main subdirectory
> > - but not any of its subdirectories.
> >
> > Is there anyway I can get rsync to recursively include this filetype
> > for all the subdirectories of a subdirectory - yet exclude these types
> > for all the other branches of the main directory tree?
> >
> > Any info would be most appreciated,
> 
> Please post your exact command line and a careful description of your
> directory structure. You are certainly thinking along the right lines, but
> without details, its hard to know why it isn't working for you.
> 
> 
> Max.


More information about the rsync mailing list