On windows machine there are lots of third party editors available to edit a binary file. I belive there should be some thing similer buildin in the *nix systems as well. any idea how can i edit a binary file on unix?
相关问题
- Is shmid returned by shmget() unique across proces
- how to get running process information in java?
- Error building gcc 4.8.3 from source: libstdc++.so
- Why should we check WIFEXITED after wait in order
- Null-terminated string, opening file for reading
For small changes, I have used hexedit:
http://rigaux.org/hexedit.html
Simple but fast and useful.
I used to use bvi.
I am developing hexvi to overcome
:%!xxd
andbvi
's limitations.hexvi
Features
hexvirc
Cons
bvi
Features
Cons
:wq
, but understands:w
and:q
)There's lightweight binary editor, check hexedit. http://www.linux.org/apps/AppId_6968.html. I tried using it for editing ELF binaries in Linux at least.
In vim You can type :%!xxd to turn it into a hexeditor. :%!xxd -r to go back to normal mode. xxd is shipped in a vim installation.
See here for some remarks about editing binary files with vim (boils down to :set binary to avoid trouble, use only the "R" or "r" command to change text, don't delete characters).
If You are an Emacs fan, see here for a guide on how to edit a binary file with Emacs.
As variant, you can use radare2:
For details about how work in visual mode you can read here
I like KHexEdit, which is part of KDE
Its "Windows style" UI is probably quite quick to learn for most people (compared to Vim or Emacs anyway :)