Last active
January 7, 2019 14:00
-
-
Save simonliu009/d1750847515e669adf2e3aecc408c01c to your computer and use it in GitHub Desktop.
Mac: open bin file 打开二进制文件 #macOS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Use sublime text to open this file | |
2. Use vi to open the file,then input the following command to switch to hex mode: | |
:%!xxd ——将当前文本转换为16进制格式。 | |
:%!od ——将当前文本转换为16进制格式。 | |
:%!xxd -c 12——将当前文本转换为16进制格式,并每行显示12个字节。 | |
:%!xxd -r ——将当前文件转换回文本格式。 | |
3. emacs | |
emacs filename | |
ALT+X hexl-mode 进入16进制模式 | |
ALX+X hexl-mode-exit 退出16进制模式 | |
选中你要修改的位置 | |
ALT+X hexl-insert-hex-char 插入16进制字符 | |
或者 | |
CTRL+ALT+X 命令 | |
然后输入16进制数回车 | |
比如输入40,就代表0x40. | |
退出命令 | |
ALX+X hexl-mode-exit | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment