Home > Linux FAQ, Programming FAQ > How do I compare two binary files on Linux?

How do I compare two binary files on Linux?

The easiest way I found is dumping the binaries into text files using hexdump and then comparing them with your favourite program (diff, Meld, etc.). E.g.:

hexdump -C a.bin >a.txt
hexdump -C b.bin >b.txt
diff a.txt b.txt

Image source
  1. No comments yet.
  1. No trackbacks yet.