Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 53242 - hexdumps in word mode are hardly readable
hexdumps in word mode are hardly readable
Product: Red Hat Linux
Classification: Retired
Component: util-linux (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Elliot Lee
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2001-09-05 08:46 EDT by Rick van Rein
Modified: 2007-04-18 12:36 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-09-05 08:46:12 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Rick van Rein 2001-09-05 08:46:07 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.75 [en] (X11; U; Linux 2.2.16-22 i686)

Description of problem:
Due to endianity, a hexdump of words usually means the bytes in a file get
swapped around when hexdump prints words, in an order like 2211 4433
6655... which requires hopping over the numbers in a hard-to-do-well
scheme. Please allow for a byte-by-byte hexdump option in addition to
current dumping options; hexdumps can now only made per word.

How reproducible:

Steps to Reproduce:
bash$ uname -m
bash$ echo "ABCD" | hexdump
bash$  echo -n "ABCD" | hexdump
0000000 4241 4443

Actual Results:  See what I entered between the commandlines.

Expected Results:  bash$  echo -n "ABCD" | hexdump
0000000 41 42 43 44
bash$ echo -n "ABCD" | hexdump -x
0000000    4241    4443

Additional info:

The -x option now is doing nothing, it just confirms the default
Perhaps the default should be byte-by-byte, to make the hexdump more
when parsing files?

Application I was working on: mastering the format of PGP files, as
specified in RFC2440.
In the past, the same problem showed up when parsing DNS message packets.
Comment 1 Elliot Lee 2002-01-04 13:17:56 EST
You can do all this with format strings.

A crude example:
hexdump -e '8/1 "%02x " "\n"' /foo/bar

If you want an option added to make this more convenient, please talk to the
util-linux maintainers (util-linux@math.uoi.no). I would guess that there is not
a huge demand for it

Note You need to log in before you can comment on or make changes to this bug.