How to compare binary files to check if they are the same?

前端 未结 14 674
傲寒
傲寒 2020-12-07 09:25

What is the easiest way (using a graphical tool or command line on Ubuntu Linux) to know if two binary files are the same or not (except for the time stamps)? I do not need

相关标签:
14条回答
  • 2020-12-07 10:18

    Use sha1 to generate checksum:

    sha1 [FILENAME1]
    sha1 [FILENAME2]
    
    0 讨论(0)
  • 2020-12-07 10:18

    I ended up using hexdump to convert the binary files to there hex representation and then opened them in meld / kompare / any other diff tool. Unlike you I was after the differences in the files.

    hexdump tmp/Circle_24.png > tmp/hex1.txt
    hexdump /tmp/Circle_24.png > tmp/hex2.txt
    
    meld tmp/hex1.txt tmp/hex2.txt
    
    0 讨论(0)
提交回复
热议问题