Open System Services Shell and Utilities Reference Manual (G06.25+, H06.03+)

od(1) OSS Shell and Utilities Reference Manual
An uppercase format character implies the long or double-precision form of the object.
You can specify multiple types by using multiple -bcdostx ags. Output lines are written for each
type specied in the order in which the types are specied.
DESCRIPTION
The od command reads le (standard input by default), and writes the information stored in le to
standard output using the format specied by the rst ag. If you do not specify the rst ag, the
-o ag is the default.
When od reads standard input, the offset and label parameters must be preceded by a + (plus sign).
The offset argument species the point in the le at which the output starts. The offset argument is
interpreted as octal bytes. If a . (dot) is added to offset, it is interpreted in decimal. If offset begins
with x or 0x, it is interpreted in hexadecimal. If b (B) is appended, the offset is interpreted as a
block count, where a block is 512 (1024) bytes.
The output continues until the end of the le. If the le argument is omitted and none of the -A, -j,
-N,or-t ags is specied, the offset argument must be preceded by a + (plus sign) character.
If the rst character of le is a + (plus sign) or the rst character of the rst le argument is
numeric, no more than two arguments are given, and none of the -A, -j, -N or -t ags is specied,
the argument is assumed to be an offset.
The label argument is interpreted as a pseudoaddress for the rst byte displayed. It is shown in
parentheses following the le offset. It is intended to be used with core images to indicate the real
memory address. The syntax for label is identical to that for offset.
EXAMPLES
1. To display a le in octal word format, a page at a time, enter:
od a.out | more
2. To translate a le into several formats at once, enter:
od -cx a.out >a.xcd
This writes a.out in hexadecimal format (the -x ag) into the le a.xcd, giving also the
ASCII character equivalent, if any, of each byte (the -c ag).
3. To start in the middle of a le, enter:
od -bcx a.out +100.
This displays a.out in octal-byte, character, and hexadecimal formats, starting from the
100th byte. The . (dot) after the offset makes it a decimal number. Without the . (dot), the
dump starts from the 64th (100 octal) byte.
NOTES
Compatibility Note
The -i ag displays short words as signed decimal values. The -i ag used to be -s in System V.
RELATED INFORMATION
Files: locale(4).
692 Hewlett-Packard Company 527188-003