Sometimes I copy a lot of data using the
dd if=/dev/sda of=/dev/sdbcommand. Recently, that copying made a bug that I have found only accidentally. Which command should I use to compare the original and the copy? The
info diff
apparently does not show that such sort of parameters can be used with the diff command.
assuming source and destination drives are identical size, compare md5sum of source and destination.
this should also work if destination is an image file.
If physical destination drive is larger than physical source drive (or file), you'll need to request MD5SUM of the destination, selecting the same number of blocks as copied.