help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fix the destroyed disk image partition table in a raw image file usi


From: Dan Hitt
Subject: Re: Fix the destroyed disk image partition table in a raw image file using Emacs.
Date: Sun, 11 Apr 2021 12:56:56 -0700

On Sun, Apr 11, 2021 at 11:45 AM <tomas@tuxteam.de> wrote:

> On Sun, Apr 11, 2021 at 10:26:26AM -0700, Dan Hitt wrote:
> > On Sun, Apr 11, 2021 at 6:41 AM Jean Louis <bugs@gnu.support> wrote:
> >
> > > * Hongyi Zhao <hongyi.zhao@gmail.com> [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/<version>/x86_64-linux-gnu/hexl
>
> Replace <version> by your Emacs version and x86_64-linux-gnu by some
> appropriate architecture string.
>

OK, i guess i do have it after all :)

Thanks for pointing out the path, and the suggestion to use apt-file.

One thing i notice about hexl, is that although it must surely be a gnu
program, based on its path, it does not understand either the --help or the
--version command line options.

Anyhow, i hope the OP can use hexl-mode if he can't find any better, more
specific tools.

dan


> > 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
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]