File list out of rsync.

Wayne Davison wayned at
Mon Nov 15 16:30:32 GMT 2004

On Mon, Nov 15, 2004 at 11:21:21AM +1100, Daryl Sayers wrote:
> If I do not use -v I get nothing printed to stdout.

... unless you use --log-format.  This causes rsync to output what files
are transferred on stdout.  You can have it output just file names using

Alternately, you might like to prefix the name with the current date and
use a regex in a script to make extra sure that you always match a log
line (which lets you turn on other output options without affecting the
parsing of the names).  For instance:

    --log-format='%t %o %l %b %f'

Would output something like this for each name:

2004/11/15 08:19:56 send 4544 68 checksum.c

You could then have a perl script match names using this regex:

($filename) = m#^\d\d\d\d/\d\d/\d\d \d\d:\d\d:\d\d \S+ \d+ \d+ (.*)#;
next unless defined $filename;


More information about the rsync mailing list