syntax wrong?

Matt McCutchen hashproduct+rsync at
Mon Feb 12 22:14:09 GMT 2007

On 2/12/07, Julian Pace Ross <linux at> wrote:
> I'm using --files-from=FILE and in this case I do NOT want to recurse into
> directories, so for example if FILE contains:
> Dir1
> Dir2
> I just want the files in Dir1 and 2 to be copied, but not the files in
> Dir1/Dir3/ for example.

Specify the directories with a trailing slash in FILE to make rsync
copy their immediate contents.  Note that rsync will create a
directory Dir1/Dir3 on the destination (since it, too, is immediately
inside Dir1) but will not copy anything into it.  If you don't want it
to create directories like Dir1/Dir3, add an exclude rule:
--exclude='/*/*/' .


More information about the rsync mailing list