Linux 如何在 unix 系统上编辑二进制文件
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/839227/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
how to edit binary file on the unix systems
提问by Hemant
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?
在 Windows 机器上,有许多第三方编辑器可用于编辑二进制文件。我相信 *nix 系统中也应该有一些类似的东西。知道如何在 unix 上编辑二进制文件吗?
采纳答案by Shannon Nelson
You can also try ghex2 GNOME utilities. This give you the automated hex-to-ASCII on the side, as well as the various character/integer decodes at the bottom.
(source: googlepages.com)
您还可以尝试 ghex2 GNOME 实用程序。这为您提供了侧面的自动十六进制到 ASCII,以及底部的各种字符/整数解码。
(来源:googlepages.com)
回答by setzamora
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.
有轻量级的二进制编辑器,检查 hexedit。http://www.linux.org/apps/AppId_6968.html。我至少尝试使用它在 Linux 中编辑 ELF 二进制文件。
回答by Pawe? Polewicz
In vim You can type :%!xxdto turn it into a hexeditor. :%!xxd -rto go back to normal mode. xxd is shipped in a vim installation.
在 vim 中你可以输入:%!xxd把它变成一个十六进制编辑器。:%!xxd -r返回正常模式。xxd 在 vim 安装中提供。
See herefor some remarks about editing binary files with vim (boils down to :set binaryto avoid trouble, use only the "R" or "r" command to change text, don't delete characters).
有关使用 vim 编辑二进制文件的一些说明,请参见此处(归结为:set binary以避免麻烦,仅使用“R”或“r”命令更改文本,不要删除字符)。
If You are an Emacs fan, see herefor a guide on how to edit a binary file with Emacs.
如果您是 Emacs 粉丝,请参阅此处获取有关如何使用 Emacs 编辑二进制文件的指南。
回答by Brad Gilbert
Blessis a high quality, full featured hex editor.
Bless是一个高质量、全功能的十六进制编辑器。
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:
它是用 mono/Gtk# 编写的,其主要平台是 GNU/Linux。然而,它应该能够在 mono 和 Gtk# 运行的每个平台上毫无问题地运行。主要功能 Bless 目前提供以下功能:
- 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.
- 高效编辑大型数据文件和块设备。
- 多级撤消 - 重做操作。
- 可定制的数据视图。
- 屏幕上的快速数据渲染。
- 多个选项卡。
- 快速查找和替换操作。
- 数据转换表。
- 高级复制/粘贴功能。
- 突出显示文件中的选择模式匹配。
- 基于插件的架构。
- 将数据导出为文本和 html(其他带有插件)。
- 数据的按位运算。
- 全面的用户手册。
回答by bitozoid
For small changes, I have used hexedit:
对于小的更改,我使用了 hexedit:
http://rigaux.org/hexedit.html
http://rigaux.org/hexedit.html
Simple but fast and useful.
简单但快速且有用。
回答by Jonik
回答by Osama Al-Maadeed
There are much more hexeditors on Linux/Unix....
Linux/Unix 上有更多的十六进制编辑器......
I use hexedit on Ubuntu
我在 Ubuntu 上使用 hexedit
sudo apt-get install hexedit
回答by E.U.A.
I made wxHexEditor, it's open sourced, written with C++/wxWidgets GUI libs and can open even your exabyte sized disk!
我制作了 wxHexEditor,它是开源的,用 C++/wxWidgets GUI 库编写,甚至可以打开 EB 大小的磁盘!
Just try.
你试一试。
回答by asdf
I've had good experience with wxHexEditor... just make sure if you are hex-editing a drive you do it via the menu
我在wxHexEditor 方面有很好的经验……只要确保你是通过菜单对驱动器进行十六进制编辑
Devices -> Open Disk Device -> SCSI Disk Drive Partition #_N_