selective dirs only

jw schultz jw at pegasys.ws
Sun Jun 15 20:48:18 EST 2003


On Sun, Jun 15, 2003 at 08:20:58PM +1000, Res wrote:
> Hi All,
> 
> Just to get the jist of things, trying to sort 5 diff rsyncs into the same
> process:)    if I want to copy only say 2 dirs and everything under them
>  when use include exclude, I have to define the dir first then the
> dir/all ?    like :
> rsync -azr host::/top_dir --include "pub/" --include "pub/*" --include "ftp1/"
> --include "ftp1/*" --exclude "*" /local/top_dir

Only if you don't care about the contents of subdirectories.
If you wanted to get all files and subdirectories of pub
you would want --include=/pub/ --include=/pub/**

Reread the section on EXCLUDE PATTERNS and you will
understand the differences.  -vv will show what matches
which patterns.

-- 
________________________________________________________________
	J.W. Schultz            Pegasystems Technologies
	email address:		jw at pegasys.ws

		Remember Cernan and Schmitt



More information about the rsync mailing list