Help needed with filtering rules - how to copy named directories only

Wayne Davison wayned at samba.org
Tue Oct 18 20:01:40 GMT 2005


On Tue, Oct 18, 2005 at 01:03:17PM +0100, CARTER-HITCHIN, David, FM wrote:
> The only way I can think around this is to run on the source server
> "find /apps/IRDtools/pkgs -name lib -type d" and pipe the output of
> that into an rsync "--files-from=-".

Yes, that's the only solution that avoids creating a lot of empty dirs
at the moment.  The closest you can get with include/exclude rules is
something like this:

+ */
+ lib/*
- *

That would copy the immediate contents of all "lib" dirs, and also the
entire hierarchy of directories.  If you want all the contents from the
subdirs under "lib", you would need to change "lib/*" to "lib/**".

..wayne..


More information about the rsync mailing list