comparing 2 in rsync
johansche at absamail.co.za
Mon Jan 12 22:14:42 GMT 2004
Thanks for your time & suggestions.
Now I at least have some lead.
On Monday 12 January 2004 00:04, Jeremy Lin wrote:
> * On Jan 11, 2004 at 09:45:14, Johan wrote:
> > Hi,
> > Is there a sure way to test 2 cd's if they are true copies in
> > rsync. I have tried this...
> > rsync -avv /mnt/cdrom/ /mnt/cdrom2
> > **
> > result....quite shotened...
> I'm not really qualified to claim with any certainty whether rsync
> can be used reliably for this purpose, but you'd probably at least
> want to use -n somewhere, since if there is indeed a mismatch
> somewhere, you're asking rsync to update that file, and I suspect
> it'll probably bomb out once it finds it can't write to the cd-rom.
> Then you wouldn't find out about mismatches that come later. Also, I
> guess you'd probably want -c so checksums are always computed.
> Probably more practical is to use something like
> $ cd /mnt/cdrom; find . -type f | sort | xargs md5sum > /tmp/sum1
> $ cd /mnt/cdrom2; find . -type f | sort | xargs md5sum > /tmp/sum2
> $ diff sum1 sum2
> This will miss things like empty directories and things that aren't
> regular files (like, say, symlinks). Also, it'll probably have
> trouble with filenames that contain whitespace. But with some more
> effort (and complication), you can get around most of the important
> Hope that helps.
May this be a good day for learning
Registered Linux User #330034 - still learning
More information about the rsync