I am trying to run rsync and produce a file list of what was done. If I use -v I am getting informational messages like: building file list ... done ..... file list is here sent 292 bytes received 24 bytes 632.00 bytes/sec total size is 9840536 speedup is 31140.94 If I do not use -v I get nothing printed to stdout. Is there a way of turning off the lovely informational messages that are of no concern to me once operationa and just leaving the file list of what was updated. I have tried a slection of -v and -q to no avail. PS: Yes this could be done via some simply crafted tool (insert your favorite awk/grep/sed/head tool here) but would only be a hack and may fail on future releases of rsync if the format/number of lines etc changed. -- Daryl Sayers Direct: (02) 8425 5507 Corinthian Engineering Ph: (02) 9906 4333 Suite 19, 401 Pacific Hwy Fax: (02) 9906 1556 Artarmon, NSW, 2064 email: daryl@ci.com.au Australia www: http://www.cordoors.com.au
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 "%f". 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; ..wayne..