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.

link|improve this question

63% accept rate
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. – ldigas 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). – ldigas 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
show 3 more comments
feedback

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

This question covers exactly the same ground as earlier questions on this topic; its answers may be merged with another identical question. See the FAQ for guidance on how to improve it.

5 Answers

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.

link|improve this answer
feedback
C:\> fc/b file1 file2

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.

link|improve this answer
feedback

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

link|improve this answer
feedback

Beyond Compare in binary mode.

Or else HashTab.

link|improve this answer
feedback

md5/md5sum isn't that slow in my experience. How long does it take for you?

link|improve this answer
I don't know. 20 minutes? ... just guessing, but enough to boil water for tea in the meantime on a electrical stove. – ldigas Mar 25 '10 at 19:53
20 minutes! Wow. I just did a test on my laptop (MacBook Pro, Core 2 Duo, 2 x 2.33 GHz, 3 GB ram) with the built-in md5. Test movie was 2.3 GB. Doing md5 on that was 3 minutes: [14:54] Ailsie:~$ time md5 Sopapillas.mpg MD5 (Sopapillas.mpg) = 2d257fd6c8e18b05f611ca0efe3a6bef - real 2m52.758s - user 0m9.339s - sys 0m5.771s So, to compare two files would be 6 minutes. Heavy I/O like that slows the mac down, but this wasn't ram-intensive. It's certainly not "click and get an instant answer". But as others said, if you want to be 100% sure, you have to check every byte... – khedron Mar 26 '10 at 19:02
feedback

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