On Sun, Apr 11, 2021 at 10:26:26AM -0700, Dan Hitt wrote: > On Sun, Apr 11, 2021 at 6:41 AM Jean Louis wrote: > > > * Hongyi Zhao [2021-04-11 16:35]: > > > It's well known that Emacs is an 8-bit clean editor which makes it > > > safe to edit binary files. So, I want to whether I can fix the above > > > destroyed disk image file with Emacs for my scenario. > > > > There is hexl library: > > > > ;; This package implements a major mode for editing binary files. It uses > > ;; a program called hexl, supplied with the GNU Emacs distribution, that > > ;; can filter a binary into an editable format or from the format back into > > ;; binary. For full instructions, invoke `hexl-mode' on an empty buffer > > and > > ;; do M-x `describe-mode'. > > > > But I guess you need `hexl' program. > > > > -- > > Jean > > > > Hi Jean, > > hexl-mode works for me on my xubuntu 20.04 system, and i do not have a > program called 'hexl'. Look around somewhere (Debian here) /usr/lib/emacs//x86_64-linux-gnu/hexl Replace by your Emacs version and x86_64-linux-gnu by some appropriate architecture string. > Of course, i don't know if my system is secretly using some other program > which does the same thing as hexl. It's all in the open ;-) Hint: apt-file search finds such things, even if you haven't installed a package. Package apt-file. Very much recommended. Cheers - t