The standard “diff” command can be used to find if two binary files differ from each other or not. The following example shows how to do it.

[neo@techpulp ~]# diff file1.bin  file2.bin
Binary files file1.bin and file2.bin differ
[neo@techpulp ~]#

Another way to find that out is to compute MD5 digest on both files and see if they match. MD5 is an cryptographic algorithm which computes an unique digest for each file. The both files are same if the MD5 digests of both files match and otherwise they differ. The “md5sum” command can be used to compute MD5 digest.

[neo@techpulp ~]# md5sum file1.bin  file2.bin
4714b62a51a4057fa73a1ded36b75143  More >