On Tue, 2007-11-13 at 17:42 +0100, Paul Slootman wrote:
> On Tue 13 Nov 2007, Ismaël BALLO wrote:
> > I've googled but not found exactly what I want.
> > I want to transfer *.log from all directories and subdirectories of /var.
> > 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 .

> but ignoring that, this is
> how I'd do it:
> 
> rsync -an --progress --include '*/' --include '*.log' --exclude '*' /var 
> 10.156.1.1:/home/toto
> 
> 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:

grep '\.log$' /tmp/source | rsync <blah> --files-from=-

Matt

-- 
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Reply via email to