table of contents
HEXD(1) | HEXD(1) |
NAME¶
hexd - dump a file to stdout in CP/M-like hexadecimal format
SYNOPSIS¶
hexd [-V ] [-w ] [-e ] [-c ] [-g ] [-s ] ['filename'] </cmdsynopsis>
DESCRIPTION¶
This program dumps a binary file to stdout in a form friendlier to the eyeball than either raw binary or the output of the Unix od(1) command. The default format is a CP/M-style hexadecimal dump with byte offset in file, 16 bytes of hex and 16 bytes of textual representation with '.' for non-printables per line. If no filename is given, this program reads from standard input.
The program accepts the following options to control its output:
-w
-e
-c
-g
-s
-V
The command line is scanned left-to-right for filenames and options, and each file dumped according to the format defined by preceding options. To turn off an option, precede the letter with a +. Options that take arguments may have them immediately following the option letter or whitespace-separated.
If the command-line arguments include two or more filenames (with - being regarded as a filename for standard input), hexd will emit a one-line header giving the name of the file in front of each input file.
The -s option expects a start offset, optionally followed by a comma-separated count. Each of these should be a decimal or hexadecimal integer (hexadecimal must be prefixed by x or h; leading zeros will be ignored).
The -w option expects a width, formatted as a single decimal or haxadecimal number in the style of an -s option argument. Odd widths turn on the -g option.
The -e option decodes the imput as EBCDIC characters and dumps their ASCII equivalents when displaying as text. The definition of EBCDIC used is IBM’s ASCII-compatible 96-character SCS set used with Systems Network Architecture (SNA).
AUTHOR¶
Eric S. Raymond <esr@thyrsus.com>. See my home page at <http://www.catb.org/~esr> for updates and related resources.
2024-02-29 |