Chinaunix首页 | 论坛 | 博客
  • 博客访问: 374905
  • 博文数量: 53
  • 博客积分: 1411
  • 博客等级: 上尉
  • 技术积分: 701
  • 用 户 组: 普通用户
  • 注册时间: 2008-11-04 14:40
文章分类

全部博文(53)

文章存档

2011年(6)

2010年(20)

2009年(18)

2008年(9)

我的朋友

分类: LINUX

2011-09-02 20:04:16

Open the hex file or any file that you want to edit in hex format in “vi“. Lets call that file “myFile.hex”.

To open the file in “vi“, type in terminal “vi myFile.hex

After the file is opened in the “vi“, make sure you are in the command mode. If you are not sure, just hit “ESC” couple of times and it should then be in command mode.

Now type the following :%!xxd“.

Voila, you are editing the file in hex mode now! Isn’t this awesome?

If you want to revert back to regular editing mode instead of hex mode, then make sure you are in command mode & then type the following :%!xxd -r“.

This will bring you back to normal editing mode. Isn’t this easy?

Let me know if you have some tricks saved in your sleeves, we can share it here with others.

阅读(2498) | 评论(0) | 转发(0) |
0

上一篇:Linux shell脚本示例

下一篇:没有了

给主人留下些什么吧!~~