I'm trying to compare hex-dumps of some 500GB disk images. I can easily view parts of the files by piping hd
into less
. I'd like something similar to interactively diff them without having to read the entire files.
I'd like to manually examine the differences rather than confirm they're different so tools like cmp
don't quite fit the job. I don't need to generate patches either.
VBinDiff would be the solution except it only handles for first 4GB of the files and its output is stacked rather than side by side.
An answer to superuser: How do I compare binary files in Linux? suggests diff -y <(xxd foo1.bin) <(xxd foo2.bin)
however the xxd
pipeline reads the whole file first.
I'd also like to collapse identical lines for easier viewing. I can use solutions that work on either Linux or Windows.
Other questions that don't solve my problem
- superuser: How to diff large files on Linux
- Asker needs output rather than interactive viewing
- Top answer suggests using
cmp
- superuser: Tool for diffing large files
- Accepted answer suggets using
split
but it would be easier to pass skips and limits toxxd
orhd
.
- Accepted answer suggets using
- Unix & Linux: Diff of two similar big raw binary files
- The asker wants to create patches rather than view the differences
- superuser: Binary diff/patch for large files on linux?
- Also wants to create patches