od

Name

od -- dump files in octal and other formats

Synopsis

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]]

Description

od is as specified in ISO POSIX (2003), but with differences as listed below.

Differences

-wwidth, --width[=width]

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

--traditional

accepts arguments in traditional form.

Note

The XSI optional behavior described in ISO POSIX (2003) is not supported unless the --traditional option is also specified.

Pre-POSIX and XSI Specifications

The LSB supports option intermixtures with the following pre-POSIX and XSI options:

-a

is equivalent to -t a, selects named characters.

-b

is equivalent to -t o1, selects octal bytes.

-c

is equivalent to -t c, selects characters.

-d

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

-f

is equivalent to -t fF, selects floats.

-i

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

Note

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

-l

is equivalent to -t d4, selects decimal longs.

-o

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

-x

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 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 ISO POSIX (2003). 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 an 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.