[Linux] binary file compare

Linux 下 binary 相關的工具如下..

hexdump:

將 hex 值dump 出來

最快的比較方式就是, hexdump file 輸出到文字檔之後, 再比較

hexedit:

修改 binary file.

常用指令

F2: Save
Ctrl + > 到檔案最尾端
Ctrl + s : Search, 找 binary  string , ex: “aabbccddee”

Ctrl + x : Save and Exit

vbindiff

視窗型的 binary diff 工具

dhex

同上, 不過 ubuntu 應該沒有收錄

cmp

$ cmp file1 file2 -l

這樣會列出兩個 binary file 的差異處.

vim

用 vimdiff 之後
再下command (兩邊的視窗都要下)
:%!xxd
就解決了.

vim 的介面算很親切的.

Related posts

Related Posts

  1. 我之前也在找linux下binary compare的軟體, vbindiff應該可以符合大部分的需求(不過我還是比較喜歡ultracompare)

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>