Friday, June 12, 2009

用vi來改binary file

最近試著用vi來改binary
加 -b
$> vi -b BINARY_FILE

打開binary後
:%!xxd

就會看到byte 跟ascii
像ultraedit看到的那樣

不過沒像ultraedit方便 左邊到哪 右邊就到哪

改完後
:%!xxd -r

然後就存檔啦

一開始不加-b的話 vi最後會幫你加上eol 所以會多一個byte
少這一步就蝦忙很久了.....

1 comment:

Anonymous said...

I read this paragraph fully concerning the difference of hottest
and previous technologies, it's awesome article.

My blog post ... cellulite treatment