richliu's blog

Linux, 工作, 生活.

richliu's blog header image 2

[Linux] binary file compare

二月 24th, 2009 · 2 Comments

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 的介面算很親切的.

On this day..

Tags: , , , , , , , ,

Related posts

Tags: UNIX

2 responses so far ↓

  • scottie // 四月 29, 2009 at 11:58 上午
    Using Mozilla Firefox Mozilla Firefox 3.0.10 on Linux Linux

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

    [回應]

  • das // 一月 11, 2010 at 10:14 上午
    Using Internet Explorer Internet Explorer 7.0 on Windows Windows XP

    good

    [回應]

Leave a Comment