Possible Duplicate:
Binary Diff Tools On Windows

What would be the easiest way of veryfying whether two binary files are the same, without actually opening them, checking versions and such in different programs ... ?

I primary mean files like 3d models, acad drawings, and the like, of which I have different versions, saved in different directories, and upon completing, I just want to find which are the newest, and which are different from the newest, and delete every other.

So far I've thought od md5 ? (which is slow, .... I want something that lets me click on two files, and it says - "they're not the same. move along." Any other ideas ?

This doesn't actually fit under "diff" tag so feel free to change it, if you can think of a better alternative.

marked as duplicate by random, quack quixote, Ivo Flipse Mar 26 '10 at 6:33

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    Why not diff them, though? I use Beyond Compare or the Total Commander built-in diff tool. They simply tell me if the files are the same or not, without any extra fuss. – alex Mar 24 '10 at 18:11
  • @alex - Because some of them are somewhat larger than usual ... in range 50-1000 mb (give or take), and that tends to crash pretty much every diff I've tried so far. I could of course check them manually, but the problem is I've got tens of them, and it is an exmtremelly tiresome process. – Rook Mar 24 '10 at 18:20
  • What platform? Linux? – Peter Mortensen Mar 24 '10 at 18:31
  • Windows (CAD is not so much into linux as a platform). – Rook Mar 24 '10 at 18:36
  • 1
    Related question? superuser.com/questions/106554/binary-diff-tools-on-windows – Gnoupi Mar 25 '10 at 14:06

Use the cmp utility. It's in Cygwin, for Windows users.

C:\> fc/b file1 file2

More information about the FC (file compare) command can be found here.

If you have many files, some sort of a hash function will be the easiest way. On my (quite old) computer, md5sum can hash a 1 GB file in 50 seconds, and that's only because of the slow HD.


So far I've thought od md5 ? (which is slow, .... I want something that lets me click on two files, and it says - "they're not the same. move along." Any other ideas ?

By definition, if you want to compare two 1G files, you're going to have to read both files. There's no magic bullet that will get past that. What if the two files differ by one byte, 99.9% of the way through the file?

In terms of clicking on the files in the shell, and comparing, Beyond Compare was already mentioned, and Total Commander rocks. But if you want a simple free integrated shell utility, try Hashtab: http://hashtab.software.informer.com

You can click on a file, get the hash, select the next file, and compare with the hash you just got.


Beyond Compare in binary mode.

Or else HashTab.

Not the answer you're looking for? Browse other questions tagged or ask your own question.