How do I compare binary files in Linux?
- by frustratedCmpNoLongerUser
I need to compare two binary files and get the output in the form
<fileoffset-hex <file1-byte-hex <file2-byte-hex
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 third-party tool?
(Note: cmp -l should be killed with fire, it uses a decimal system for offsets and octal for bytes.)