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

前端 未结 14 681
傲寒
傲寒 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 09:52

    md5sum binary1 binary2
    

    If the md5sum is same, binaries are same

    E.g

    md5sum new*
    89c60189c3fa7ab5c96ae121ec43bd4a  new.txt
    89c60189c3fa7ab5c96ae121ec43bd4a  new1.txt
    root@TinyDistro:~# cat new*
    aa55 aa55 0000 8010 7738
    aa55 aa55 0000 8010 7738
    
    
    root@TinyDistro:~# cat new*
    aa55 aa55 000 8010 7738
    aa55 aa55 0000 8010 7738
    root@TinyDistro:~# md5sum new*
    4a7f86919d4ac00c6206e11fca462c6f  new.txt
    89c60189c3fa7ab5c96ae121ec43bd4a  new1.txt
    

提交回复
热议问题