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

Peter Pentchev roam at ringlet.net
Sat Nov 20 11:19:15 UTC 2010


On Sat, Nov 20, 2010 at 01:21:57AM +0200, Peter Pentchev wrote:
> On Fri, Nov 19, 2010 at 06:35:19PM +0100, 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 :-))
> 
> Errrr... are you thinking of cmp(1), maybe with the -l option? :)

And just for the record, at http://devel.ringlet.net/textproc/block-summarize/
or git://gitorious.org/block-summarize/block-summarize.git you may find
a simple utility that summarizes cmp(1)'s output per block.

(oof, I just found out that I've still left the default blocksize at 32;
 will change that for version 0.02, for now there's the -b option :)

G'luck,
Peter

-- 
Peter Pentchev	roam at space.bg    roam at ringlet.net    roam at FreeBSD.org
PGP key:	http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint	FDBA FD79 C26F 3C51 C95E  DF9E ED18 B68D 1619 4553
Nostalgia ain't what it used to be.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-usb/attachments/20101120/a6349e82/attachment.pgp


More information about the freebsd-usb mailing list