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?
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.
Bless is a high quality, full featured hex editor.
It is written in mono/Gtk# and its primary platform is GNU/Linux. However it should be able to run without problems on every platform that mono and Gtk# run. Main Features Bless currently provides the following features:
- Efficient editing of large data files and block devices.
- Multilevel undo - redo operations.
- Customizable data views.
- Fast data rendering on screen.
- Multiple tabs.
- Fast find and replace operations.
- A data conversion table.
- Advanced copy/paste capabilities.
- Highlighting of selection pattern matches in the file.
- Plugin based architecture.
- Export of data to text and html (others with plugins).
- Bitwise operations on data.
- A comprehensive user manual.
There are much more hexeditors on Linux/Unix....
I use hexedit on Ubuntu
sudo apt-get install hexedit