rsync dir in _both_ directions?

Jack McKinney jackmc-rsync at
Thu Feb 7 07:14:23 EST 2002

Big Brother tells me that Martin Pool wrote:
> On  5 Feb 2002, Jack McKinney <jackmc-rsync at> wrote:
> > 
> >     Yes.  blocks are 512 bytes long.  If I add a 14 byte header on a message
> > near the beginning, then there are no identical blocks.
> In this case there are identical blocks starting just after the
> inserted header.  You might not expect rsync to handle this case, but
> it does!

    If I add 512 bytes at the begining of the file, then I would expect
it.  If I only add 14 bytes, then I don't think rsync will detect this,
as it would require it to compute checksums start at EVERY byte instead
of 512 byte checksums at offsets 0, 512, 1024, 1536, et al.
    It is an easy experiment.  Create a large text file (e.g., uuencode
a decently large binary) and rsync it to another machine and time it.
Then, edit it, and change ONE BYTE and rsync again.  It should go much
faster because only one block has changed.  Then, edit it a second time
and add a new line at the top that says Kilroy was here.  This will add
17 bytes to the file (13 letters, two spaces, one period, one newline).
Then rsync it again.  I suspect that your xfer time will be comparable to
the first one, not to the second.

> >     It can take 5-30 minutes to finish the first, and I want it to then
> > start the second one without having to watch for the first one.  I prefer
> > not to use ssh's feature to remember keys or to use .rhosts/.shosts.
> Make a little shell script:
>   eval `ssh-agent`
>   ssh-add
>   rsync foo bar
>   rsync qux zump
>   ..
>   kill $SSH_AGENT_PID

     As I indicated, I do not want to use ssh-agent.

Sherry: To me, humor is like medicine!            Jack McKinney
Niles: Guess we're in the placebo group.          jackmc at
1024D/FBED2DAA 4096g/3F93879F
2002 Chicago Cubs magic number: 163
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 240 bytes
Desc: not available
Url :

More information about the rsync mailing list