--include option

Wayne Davison wayned at users.sourceforge.net
Mon Aug 12 08:01:01 EST 2002


On Mon, 12 Aug 2002, Leaw, Chern Jian wrote:
> 	# rsync -avz --include-from=files_included  /stor/circuit_design/
> mickey.willowglen.com:/stor/circuit_design/

The problem with your command is that it contains include directives but
no exclusions, so nothing limits the default operation of sending the
entire subdirectory contents.  An easier way to go for this specific
problem is to ignore includes and specify two source dirs, like this:

    rsync -avz /stor/circuit_design/{clock_speed,fub_layout}
        mickey.willowglen.com:/stor/circuit_design/

The above assumes your shell has {} expansion, like bash and zsh.  If it
does not, just mention both directories separately (without any trailing
slash).  The trailing slash on the destination isn't required, but it 
doesn't hurt either, so I left it in.

To make things work with your include-using command, you'd need to use
something like this in your include file:

+ /clock_speed 
+ /fub_layout
- /*

This allows the two directories you want, and excludes everything else
in the base directory of the transfer.  Since none of the rules apply to
files deeper than the base dir, none of them will be excluded.

..wayne..




More information about the rsync mailing list