Rsync write behaviour / efficiency

andy at andy at
Mon Mar 7 09:31:35 GMT 2005

Rsync is efficient at transferring diffs across the wire, but how
efficient is it at updating the remote file itself (in terms of disk

If, for example, you have a 500MB file (say an ISO) whose modification
consists solely of a few bytes added on to the beginning of the file.

Will it create an entirely new 500MB file?  Or will it somehow know how to
insert the bytes at the beginning of the remote file?

If it is capable of the latter, how does it do it in terms of C calls,
considering there is no C call to do inserts into a file?  write(), while
it can be positioned with lseek(), only overwrites and cannot insert.

More information about the rsync mailing list