od -- dump files in octal and other formats


od [-abcdfilox] [-w width | --width-width] [-v] [-A address_base] [-j skip] [-n count] [-t type_string] [file...]
od --traditional [options] [file] [[+]offset [.] [b]] [[+]label [.] [b]]


The od command shall provide all of the madatory functionality specified in POSIX 1003.1-2008 (ISO/IEC 9945-2009), but with extensions and differences to the XSI optional behavior as listed below.

Extensions and Differences


unspecified behavior.

Note: Applications wishing to achieve the POSIX 1003.1-2008 (ISO/IEC 9945-2009) behavior for -s should instead use -t d2.

-wwidth, --width[=width]

each output line is limited to width bytes from the input.


accepts arguments in traditional form, see Traditional Usage below.

Note: The XSI optional behavior for offset handling described in POSIX 1003.1-2008 (ISO/IEC 9945-2009) is not supported unless the --traditional option is also specified.

Pre-POSIX and XSI Specifications

The LSB supports mixing options between the mandatory and XSI optional synopsis forms in POSIX 1003.1-2008 (ISO/IEC 9945-2009). The LSB shall support the following options:


is equivalent to -t a, selects named characters.


is equivalent to -t o1, selects octal bytes.


is equivalent to -t c, selects characters.


is equivalent to -t u2, selects unsigned decimal two byte units.


is equivalent to -t fF, selects floats.


is equivalent to -t d2, selects decimal two byte units.

Note: This usage may change in future releases; portable applications should use -t d2.


is equivalent to -t d4, selects decimal longs.


is equivalent to -t o2, selects octal two byte units.


is equivalent to -t x2, selects hexadecimal two byte units.

Note that the XSI option -s need not be supported.

Traditional Usage

If the --traditional option is specified, there may be between zero and three operands specified.

If no operands are specified, then od shall read the standard input.

If there is exactly one operand, and it is an offset of the form [+]offset[.][b], then it shall be interpreted as specified in POSIX 1003.1-2008 (ISO/IEC 9945-2009). The file to be dumped shall be the standard input.

If there are exactly two operands, and they are both of the form [+]offset[.][b], then the first shall be treated as an offset (as above), and the second shall be a label, in the same format as the offset. If a label is specified, then the first output line produced for each input block shall be preceded by the input offset, cumulative across input files, of the next byte to be written, followed by the label, in parentheses. The label shall increment in the same manner as the offset.

If there are three operands, then the first shall be the file to dump, the second the offset, and the third the label.

Note: Recent versions of coreutils contain an od utility that conforms to POSIX 1003.1-2008 (ISO/IEC 9945-2009). However, in April 2005, this version was not in widespread use. A future version of this specification may remove the differences.