Transfer files matching a pattern

Paul Slootman paul+rsync at wurtel.net
Tue Nov 13 20:53:10 GMT 2007


On Tue 13 Nov 2007, Matt McCutchen wrote:
> > > Directories have to be created remotely only if files match
> > 
> > That last restriction is a bit of a spoiler,
> 
> It can be achieved with --prune-empty-dirs .

Ah, that's the option I was missing.

> > But if you're using --files-from anyway, why not use find to get the
> > list of files and don't let rsync recurse...
> 
> Why find ?  It seems to me that one would do:

Because of what the OP said:

: where
: /tmp/source contains
: /var
:

grep '\.log$' /tmp/source will not find much then...


Paul Slootman


More information about the rsync mailing list