LinuxCommandLibrary

hd

displays file contents in hexadecimal format

TLDR

Display file in hex

$ hd [file]
copy
Show first 100 bytes
$ hd -n 100 [file]
copy
Skip first 50 bytes
$ hd -s 50 [file]
copy
One-byte octal display
$ hd -b [file]
copy
Canonical hex+ASCII display
$ hd -C [file]
copy

SYNOPSIS

hd [options] [file]

DESCRIPTION

hd displays file contents in hexadecimal format. It's equivalent to hexdump -C, showing both hex values and ASCII representation.
The tool is useful for examining binary files, analyzing data formats, and debugging. It formats output in readable columns.

PARAMETERS

FILE

File to display.
-n LENGTH
Number of bytes to display.
-s OFFSET
Skip offset bytes.
-b
One-byte octal display.
-C
Canonical hex+ASCII display.
-v
Display all data (no suppression).
--help
Display help information.

CAVEATS

Alias for hexdump -C on many systems. Large files produce extensive output. Binary data shown as dots in ASCII column.

HISTORY

hd is typically a symlink to hexdump from BSD utilities, providing convenient hex dump functionality.

SEE ALSO

hexdump(1), xxd(1), od(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community