maux
Star on GitHub Buy me a coffee

Manual / od

od(1)

OD(1) General Commands Manual OD(1)

od - dump file bytes

od [-bcdosvx] [-A base] [-t type] [-j skip] [-N limit] [file]

Od dumps a file with the origin of the line on the left. This byte-machine version prints sixteen bytes per line and uses a four-digit hexadecimal offset, rather than PDP-11 octal words. With no file it reads standard input. A final line gives the trailing offset alone.

Hexadecimal bytes; also the default.
Three-digit octal bytes.
Printable characters, with a dot for nonprinting bytes. The high bit is stripped before classifying characters.
Unsigned decimal 16-bit words, same as -t u2.
Octal 16-bit words, same as -t o2.
Signed decimal 16-bit words, same as -t d2.
Offset column in base d (5 digits), o (6) or x (4, the default); n prints no offset.
Output type, repeatable. A type string is one or more of a (named characters, low seven bits), c (characters, with C escapes, else three octal digits), and d, o, u or x (signed decimal, octal, unsigned decimal, hexadecimal) followed by a size: 1, 2 or 4, or C, S, I, L (1, 2, 4, 4). No size means 4. There is no 8-byte unit: x8 and every other size is a usage error. Units are little-endian and the last one of a short row is padded with zero bytes. Each type prints its own line under the same offset; later lines carry a blank offset, and the columns are widened to line up.
Print every row. Without it, a row equal to the one before collapses to a single * line for the whole run.
Read and discard skip bytes first.
Dump at most limit bytes.

Of the old letters, -x, -b and -c together print in hex, octal, character order whatever the argument order; -t, -d, -o and -s print in argument order. Skip and limit are unsigned decimal operands.

/usr/man/OD this page

cat(1), licenses(1)

Exit status is 0 on completion, 1 if the input cannot be opened, 2 for usage errors.

Offsets and numeric operands are 16-bit; do not use values above 65535. Hexadecimal digits are upper case, as in the offset column. -x is hexadecimal BYTES here, not the XCU's 16-bit words (use -t x2). -c keeps the high bit stripped, so a text byte prints as itself where a host od prints octal; -t c does the same for a byte whose low seven bits are printable or a C escape. No 8-byte or floating types.

September 19, 2026 maux