Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

7
  • 113
    In Bash: diff <(xxd b1) <(xxd b2) but the output format of this (or yours) is nowhere near what the OP asked for. Commented Mar 29, 2010 at 16:33
  • 13
    with vimdiff it is, it will color the bytes in the lines where the two 'files' differ
    – akira
    Commented Mar 30, 2010 at 4:45
  • Nice. I'm on an embedded system that uses BusyBox and there is no cmp, but hexdump + diff works like a charm. Commented Mar 22, 2013 at 3:47
  • 1
    This worked great for me (with opendiff on OS X instead of vimdiff) — the default view xxd provides keeps the diff engine on track comparing byte-by-byte. With plain (raw) hex simply column-fit with fold, diff would try to fold/group random stuff in the files I was comparing.
    – natevw
    Commented Nov 15, 2014 at 23:26
  • 3
    This command does not work well for byte addition removal, as every line that follows will be misaligned and seen as modified by diff. The solution is to put 1 byte per line and remove the address column as proposed by John Lawrence Aspden and me. Commented Apr 4, 2015 at 20:38