Sunday, May 12, 2013

Edit a binary file in VI


Let us edit a file in binary mode with the -b switch

$ vi -b somefile.bin

Once inside the file go to the command mode then press the following, I am not sure about the % is for,  However !xxd is to run the xxd command.

:%!xxd

Now navigate around and begin editing the HEX characters, Ahhhh one picture is definitely worth a thousand words.


No comments:

Post a Comment