On Tue, Jun 21, 2005 at 09:30:23PM -0400, sc0ri0n wrote:
> I simply would like to have a list of transferred files.  However,
> from wht I understand, in the way we use rsync, there is no daemon or
> any rsync server at targets.

The best way to get the list of transferred files in that case is to
specify the --log-format=FORMAT option, specify some fields that make
the names easy to parse (such as "%t %f", or "%i %n" in a modern
rsync), and then redirect the output to a file (or use the "tee"
command).  You may want to eliminate the -v option (try it and see):

  rsync -a -e rsh --log-format='%i %n' --rsync-path=/opt/bin/rsync \
    sourcedir/ [EMAIL PROTECTED]:/targetdir/ | tee outfile
  sed -ne 's/^<......... //p' outfile >xfered_files

Or, for an older rsync:

  rsync -a -e rsh --log-format='%t %f' --rsync-path=/opt/bin/rsync \
    sourcedir/ [EMAIL PROTECTED]:/targetdir/ | tee outfile
  DD='[0-9][0-9]'
  sed -ne "s;^$DD$DD/$DD/$DD $DD:$DD:$DD ;;p" outfile >xfered_files

You could also eliminate the use of the "outfile" if you don't want to
watch rsync run.

..wayne..
-- 
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