Linux. Compare binary files

Posted by frustratedCmpNoLongerUser on Super User See other posts from Super User or by frustratedCmpNoLongerUser
Published on 2010-03-29T15:28:57Z Indexed on 2010/03/29 15:33 UTC
Read the original article Hit count: 441

Filed under:

I need to compare two binary files and get output in form

for every different byte. So if file1.bin is

  00 90 00 11

in binary form

and file2.bin is

  00 91 00 10

I want to get something like

  00000001 90 91
  00000003 11 10

what is the easiest way to accomplish the goal? Standard tool? Some 3rd party tool?

inb4: cmp -l should be killed with fire,it uses decimal system for offsets and octal for bytes. "Consistency for losers" must be cmp's motto.

© Super User or respective owner

Related posts about linux