All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Millan <rmh@aybabtu.com>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: New command dump
Date: Sun, 5 Aug 2007 11:58:57 +0200	[thread overview]
Message-ID: <20070805095857.GA25768@aragorn> (raw)
In-Reply-To: <ca0f59980708040821k6db513ebu105b8ae3fbc52499@mail.gmail.com>

On Sat, Aug 04, 2007 at 11:21:24PM +0800, Bean wrote:
> On 8/4/07, Robert Millan <rmh@aybabtu.com> wrote:
> > On Fri, Aug 03, 2007 at 11:33:38PM +0800, Bean wrote:
> > > Hi,
> > >
> > > I have written a new command dump, it can hex dump content of file or memory.
> > >
> > > usage:
> > >
> > > dump [-s skip] [-n length] { FILE | (mem) }
> > >
> > > The output look just like command hexdump.
> >
> > I see that the output of hexdump is the same as "od -x".  However, I find
> > "od -tx1" more useful.  Maybe it would be better to do that instead?
> 
> In my system, hexdump output look like this:
> 
> 00000000  eb 5e 80 05 20 39 ff ff  00 00 00 00 02 02 40 00  |.^.. 9........@.|
> 00000010  02 00 02 43 7d f8 3f 00  3f 00 ff 00 00 00 00 00  |...C}.?.?.......|
> 00000020  00 00 00 00 80 00 29 00  00 00 00 20 20 20 20 20  |......)....     |
> 00000030  20 20 20 20 20 20 46 41  54 31 36 20 20 20 00 00  |      FAT16   ..|
> 
> od -tx1:
> 
> 0000000 eb 5e 80 05 20 39 ff ff 00 00 00 00 02 02 40 00
> 0000020 02 00 02 43 7d f8 3f 00 3f 00 ff 00 00 00 00 00
> 0000040 00 00 00 00 80 00 29 00 00 00 00 20 20 20 20 20
> 0000060 20 20 20 20 20 20 46 41 54 31 36 20 20 20 00 00
> 
> I think the previous one looks better, because it has text char as
> well as hex value.

I was referring to:

$ hexdump /bin/ls | head -n 1
0000000 457f 464c 0102 0001 0000 0000 0000 0000
$ od -tx1 /bin/ls | head -n 1
0000000 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00

Your example seems ok IMO.

-- 
Robert Millan

<GPLv2> I know my rights; I want my phone call!
<DRM> What use is a phone call, if you are unable to speak?
(as seen on /.)



  reply	other threads:[~2007-08-05  9:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-03 15:33 New command dump Bean
2007-08-04  9:49 ` Robert Millan
2007-08-04 15:21   ` Bean
2007-08-05  9:58     ` Robert Millan [this message]
2007-08-05 18:39 ` Hollis Blanchard
2007-11-10 17:38 ` Marco Gerards
2007-11-14  6:31   ` Bean
2007-11-18  6:43     ` Robert Millan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070805095857.GA25768@aragorn \
    --to=rmh@aybabtu.com \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.