hexedit详解

hexedit详解最近在看内核地址转换相关的内容用到了 hexedit 发现没有相关的说明 所以自己学习后简单写一下 hexedit 1 Linuxmanpage 是查看和编辑十六进制或 ASCII 文件的工

大家好,欢迎来到IT知识分享网。

hexedit [-s | --sector] [-m | --maximize] [-h | --help] [filename]

Hexedit 同时以 ASCII 和十六进制显示文件。文件可以是一个设备,因为文件是一次读取一个片段。您可以修改文件并在其中搜索。

可选操作:

-s, --sector 将显示设置为包含整个扇区 -m, --maximize 尽量把显示效果最大化。 

快速命令

进入编辑器以后直接按键即可操作的命令

移动

<,> : 转到文件的开头/结尾
Right: 下一个字符
Left: 前一个字符
Down: 下一行
Up: 前一行
Home: 行的第一个字符
End: 行的最后一个字符
PUp: 向上翻页
PDown: 向下翻页







其他命令

F2: 保存
F3: 打开其他文件
F1: 帮助
Ctrl-L: redraw
Ctrl-Z: 暂时停办(推出后使用fg回来,使用jobs 查看 停办的任务)
Ctrl-X:保存并推出
Ctrl-C: 退出不保存
Tab: hex和ascii之间切换
Return: 跳到指定地址(不区分大小写)
Backspace: 撤消前一个修改的字符
Ctrl-U: 撤销所有的修改
Ctrl-S: 向前搜索 16进制值
Ctrl-R: 向后搜索 16进制值











剪切粘贴

Ctrl-Space: set mark
Esc-W: copy
Ctrl-Y: paste
Esc-Y: paste into a file
Esc-I: fill



命令详解

上下左右箭头用来移动光标一个字符 Ctrl+F, Ctrl+B(上下页) Ctrl+N, Ctrl+P(上下行) 移动光标. Ctrl+Right-Arrow, Ctrl+Left-Arrow, Ctrl+Down-Arrow, Ctrl+Up-Arrow 移动 n 次光标 (有时候没有用) Esc+Right-Arrow, Esc+Left-Arrow, Esc+Down-Arrow, Esc+Up-Arrow 移动 n 次光标 Esc+F, Esc+B,(左右N次) Esc+N, Esc+P(上下N次)移动 n 次光标 Home, Ctrl+A - go the beginning of the line. End, Ctrl+E - go to the end of the line. Page up, Esc+V, F5 - go up in the file by one page. Page down, Ctrl+V, F6 - go down in the file by one page. <, Esc+<, Esc+Home - go to the beginning of the file. >, Esc+>, Esc+End - go to the end of the file (for regular files that have a size). Ctrl+Z - suspend hexedit. Ctrl+U, Ctrl+_, Ctrl+/ - undo all (forget the modifications). Ctrl+Q - read next input character and insert it (this is useful for inserting control characters and bound keys). Tab, Ctrl+T - toggle between ASCII and hexadecimal. /, Ctrl+S - search forward (in ASCII or in hexadecimal, use TAB to change). Ctrl+R - search backward. Ctrl+G, F4 - go to a position in the file. Return - go to a sector in the file if --sector is used, otherwise go to a position in the file. Esc+L - display the page starting at the current cursor position. F2, Ctrl+W - save the modifications. F1, Esc+H - help (show the man page). Ctrl+-, F3 - open another file Ctrl+L - redisplay (refresh) the display (usefull when your terminal screws up). Backspace, Ctrl+H - undo the modifications made on the previous byte. Esc+Ctrl+H - undo the modifications made on the previous bytes. Ctrl+Space, F9 - set mark where cursor is. Esc+W, Delete, F7 - copy selected region. Ctrl+Y, Insert, F8 - paste (yank) previously copied region. Esc+Y, F11 - save previously copied region to a file. Esc+I, F12 - fill the selection with a string Esc+T - truncate the file at the current location Ctrl+C - unconditional quit (without saving). F10, Ctrl+X - quit. 

While searching, it could be interesting to know which position the search has reached. It’s always nice to see something moving to help waiting.

The hexadecimal search could be able to search modulo 4 bits instead of 8 bits. Another feature could be to complete padd odd length hexadecimal searches with zeros.

免责声明:本站所有文章内容,图片,视频等均是来源于用户投稿和互联网及文摘转载整编而成,不代表本站观点,不承担相关法律责任。其著作权各归其原作者或其出版社所有。如发现本站有涉嫌抄袭侵权/违法违规的内容,侵犯到您的权益,请在线联系站长,一经查实,本站将立刻删除。 本文来自网络,若有侵权,请联系删除,如若转载,请注明出处:https://haidsoft.com/110085.html

(0)
上一篇 2026-02-02 20:15
下一篇 2026-02-02 20:26

相关推荐

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注微信