Find the answer to your Linux question:
Results 1 to 3 of 3
I am having difficulty changing the format of rsync's output through the --log-format option. According to the man pages and many web pages the information rsync sends through to the ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2005
    Location
    USA
    Posts
    19

    rsync log format, having trouble with


    I am having difficulty changing the format of rsync's output through the --log-format option. According to the man pages and many web pages the information rsync sends through to the log or stdout can be customized by setting --log-format="%some%letters", but no matter what I try the output remains the same as it is if I don't set --log-format at all.

    For example:
    dir1 contains f1
    dir2 contains f1, f2

    Code:
    $ rsync -nr dir2/ dir1
    returns

    Code:
    building file list ... done
    f2
    
    sent 60 bytes  received 24 bytes  168.00 bytes/sec
    total size is 9  speedup is 0.11

    and

    Code:
    $ rsync -nr --log-format="%f %l" dir2/ dir1
    gives

    Code:
    building file list ... done
    f2
    
    sent 96 bytes  received 36 bytes  264.00 bytes/sec
    total size is 24  speedup is 0.18
    when I would expect it to return something like "f2 16" for the name(%n) and size (%l) of the file. I've looked at the man pages for rsync and rsyncd.conf and am still lost.

    Can anyone help?

  2. #2
    Just Joined!
    Join Date
    Jan 2005
    Location
    USA
    Posts
    19

    solved

    I've figured out my problem. --log-format is ignored when -n (dry run) is used.

    This is annoying for troubleshooting programs and a hinderance when writing programs that use rsync to just compare two directories without transfering files.

    I notified the developers of this short coming.

  3. #3
    Just Joined!
    Join Date
    Jan 2005
    Location
    USA
    Posts
    19

    fixed in 2.6.4

    ------ Additional Comment #1 From Wayne Davison 2005-03-09 10:40 [reply] -------

    This is one of the fixed things in 2.6.4, now in pre-release testing.

  4. $spacer_open
    $spacer_close

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •