Log format

Matt McCutchen hashproduct+rsync at gmail.com
Thu Oct 12 20:48:26 GMT 2006

On 10/12/06, Markus Marquardt <markus.marquardt at atosorigin.com> wrote:
> i am using the output of --log-format=%f in a shell script to
> post-process the changed files.
> After an update from rsync 2.6.3 to 2.6.8 the script doesn't work
> correctly because it seems that since rsync 2.6.4 even directories
> appear in the log. Is there any way to have only the changed _files_ logged?
> BTW: What would be better to use: %n or %f?

If you use %n, you get a trailing slash on directories that you can
use to filter them out of the log.

If you want only the files whose data changed, use --log-format="%i
%f".  %i represents a nine-character code indicating what was changed;
the first character is ">" or "<" for a change to file data.  You can
grep for lines that begin with ">" or "<" and then "cut" the first ten
characters off.


More information about the rsync mailing list