tags:

views:

368

answers:

6

I need from time to time to compare files binarily but haven't found any open source tool that can do this. UltraCompare can but it's a commercial product.

Anybody know of any?

+1  A: 

Subversion must know how. It supports incremental change recording for binary objects.

Worst case you could look at their source base...

dmckee
+2  A: 

There's an open-source product called VBinDiff that I found in a search, but I don't have any direct experience with it. It appears to be cross-platform (Linux and Windows) and has packages for the binaries and source. Good luck!

scwagner
+1  A: 

Have a look here for a similar question

Dan
+3  A: 

bsdiff, xdelta are two that immediately come to mind.

womble
A: 

The standard GNU diff shows if two files differ. You might want to look into xdelta for tracking changes (probably what SCM tools use).

To see changes in the files you could hexdump both files and just diff them, I suppose.

sebnow
+1  A: 

GNU diffutils comes with a program called cmp that will tell you the first offset at which two binary files differ. Unfortunately, it does little more than that.

Alternatively, you could hexdump each file and pipe it into your favorite text diff tool:

diff <(hexdump -v -e '1/1 "%02x\n"' binfile1) <(hexdump -v '1/1 "%02x\n"' binfile2)
Adam Rosenfield
Thanks for this - just wanted to add that the above `hexdump` form causes a display of one byte per line; if you want to show the same byte as both byte value and a character on a single line, an additional `-e` statement should be included for each `hexdump` - so ...
sdaau
... the above becomes: `diff <(hexdump -v -e '1/1 "%_p "' -e '1/1 "%02x\n"' binfile1) <(hexdump -v -e '1/1 "%_p "' -e '1/1 "%02x\n"' binfile2)`
sdaau