On Thu, 2003-10-23 at 05:39, Kurt Roeckx wrote: > On Wed, Oct 22, 2003 at 11:46:22AM -0700, jw schultz wrote: > > On Wed, Oct 22, 2003 at 08:31:12PM +0200, Kurt Roeckx wrote: > > > Hi, > > > > > > I'm trying to sync text files where lines get inserted and > > > deleted. From what I understand, rsync uses blocks to compare > > > and so can't find much data that matches. > > > > > > Would it be possible to make it work so it finds blocks that get > > > inserted or deleted? > > > > It already does. > > Does it only do it on block basis? Or will it try to find an > offset inside the block?
It will find matching blocks at arbitrary byte offsets. Think of the original file as a sequence of fixed sized blocks. Inserting or deleting a single byte "breaks" that block so it no longer matches, but rsync will match all the blocks before and after that non-matching block. Note that one think that can break rsync for text files is MSDOS CR/LF vs Unix LF line termination. This effectively makes a change every line, and unless you have lines longer than the block size you are using, rsync will not be able to find a single match. -- Donovan Baarda <[EMAIL PROTECTED]> http://minkirri.apana.org.au/~abo/ -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html