[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: New command dump
From: |
Robert Millan |
Subject: |
Re: New command dump |
Date: |
Sun, 5 Aug 2007 11:58:57 +0200 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
On Sat, Aug 04, 2007 at 11:21:24PM +0800, Bean wrote:
> On 8/4/07, Robert Millan <address@hidden> 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 |.^..
> address@hidden|
> 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 /.)