itemized option (-ii) with --log-file and --log-file format

Jignesh Shah jignesh.shah1980 at gmail.com
Tue Apr 7 06:08:20 GMT 2009


David, How could I use sed in "rsync -av --stats -ii
--log-file-format='CONTENTS: %i %f %l %o %b' --log-file='/tmp/rsync-test'
src/ dest/ " command. For that, i think I have to redirect output to stdout
using --out-format an needs to read it. but I want to redirect the desire
output directly to the file.

Thanks.

On Mon, Apr 6, 2009 at 12:24 PM, David Overton <david at overtons.id.au> wrote:

> Pipe the output through sed?
>
> 2009/4/6 Jignesh Shah <jignesh.shah1980 at gmail.com>:
> > Thanks Wayne for reply. I want to use log-file support only so that i
> need
> > not to read stdout and put output into the file. I have to use -ii so
> that
> > it print all the statistic info about what files/dirs synched and what
> are
> > not. Please refer below output:
> >
> > with -i only.
> > ---------------
> >
> > 2009/04/06 10:38:41 [27475] building file list
> > 2009/04/06 10:38:41 [27475] sent 88 bytes  received 12 bytes  200.00
> > bytes/sec
> > 2009/04/06 10:38:41 [27475] total size is 1003012  speedup is 10030.12
> >
> > with -ii
> > ---------
> >
> > 2009/03/31 15:15:17 [4537] building file list
> > 2009/03/31 15:15:29 [4537] created directory Mydocs1
> > 2009/03/31 15:15:29 [4537] CONTENTS: cd+++++++++ Mydocs/. 4096 send 0
> > 2009/03/31 15:15:29 [4537] CONTENTS: >f+++++++++ Mydocs/1.pl 394 send 437
> > 2009/03/31 15:15:29 [4537] CONTENTS: >f+++++++++ Mydocs/CHANGELOG.txt
> 2588
> > send 2631
> > .
> > .
> >
> > I want the output of -ii but dont want cryptic output in it (e.g.
> > cd+++++++++ , >f+++++++++ etc). If we remove it then it will become
> similar
> > output as 2.6.* version output. Is it possible?
> >
> > Thanks,
> > Jignesh
> >
> > On Thu, Apr 2, 2009 at 8:14 PM, Wayne Davison <wayned at samba.org> wrote:
> >>
> >> On Wed, Apr 01, 2009 at 10:50:13AM +0530, Jignesh Shah wrote:
> >> > I noticed that the output format for this command is different from
> >> > rsync
> >> > V2.6.* . Is there any way I can make this output similar to rsync
> >> > V2.6.*?
> >>
> >> What difference are you referring to?  The use of send instead of recv
> >> for a local transfer?  That is a more accurate representation of what
> >> rsync is doing, but you can change it by forcing rsync to pull files
> >> from localhost.  See the support/lsh script for a way to pull from
> >> localhost w/o using a remote shell.  If that's not the issue, please
> >> elaborate.
> >>
> >> ..wayne..
> >
> >
> > --
> > Please use reply-all for most replies to avoid omitting the mailing list.
> > To unsubscribe or change options:
> > https://lists.samba.org/mailman/listinfo/rsync
> > Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html<http://www.catb.org/%7Eesr/faqs/smart-questions.html>
> >
>
-------------- next part --------------
HTML attachment scrubbed and removed


More information about the rsync mailing list