Change in reporting for --dry-run in 2.6.x

Wayne Davison wayned at samba.org
Wed Jan 28 19:39:02 GMT 2004


On Wed, Jan 28, 2004 at 12:38:11PM -0500, Alberto Accomazzi wrote:
> I just noticed that there is an extra blank line in the output generated 
> by rsync when the --dry-run (-n) flag is used.  This seems to have 
> started with 2.6.0.  Is this desired?

The NEWS file has this (understated statement) to say about it:

    * Various trailing-info sections are now preceded by a newline.

> The reason why I'm asking is because I use scripts that parse the
> output from rsync and little modifications in verbosity can make or
> break things easily.

One of the benefits of having the blank line is that it makes it easier
to stop processing the list of changes before you get to the footer
data.  For instance, imagine someone creating a directory with the name
"wrote 8 bytes  read 4 bytes  4.00 bytes" and then putting a file named
"sec" in it.  (Yes, the current code is vulnerable to someone putting a
newline into a filename, but we should really fix that in the same way
that ls does.)

So, this change does mean that any scripts that process the verbose
output will need to be tweaked to handle the new blank line.  However, I
don't foresee any other changes being made to the verbose output (since
we are cognizant of the fact that people do parse it).

..wayne..


More information about the rsync mailing list