copying /dev/da0 with dd(1) to file: output differs

Hans Petter Selasky hselasky at c2i.net
Fri Nov 19 18:16:03 UTC 2010


On Friday 19 November 2010 18:35:19 Matthias Apitz wrote:
> El día Friday, November 19, 2010 a las 06:21:09PM +0100, Hans Petter Selasky 
escribió:
> > > > Can you dump the data into hex using hexdump -C and show us the
> > > > difference.
> > > 
> > > Note: the output of the dd(1) is around 3.8 GByte. I compared the 1st
> > > 2.000.000 lines of the hexdump: no diff; any better tool to show the
> > > 1st block which differs?
> > > 
> > > > Usually you would use bs=65536 (Does that change anything)?
> > > 
> > > Same result: they differ :-(
> > > 
> > > 	matthias
> > 
> > bsdiff ?
> 
> This will not work with such big files (requires 8x memory of the file):
> 
> I was thinking in a tool just reading each file block by block,
> comparing the blocks and noting the 1st diff with block offset number.
> (some 10 lines of C code :-))
> 
> 	matthias

Maybe you need to write a small C-program to do that.

You can use bcmp() to compare two buffers.

--HPS


More information about the freebsd-usb mailing list