Open System Services Shell and Utilities Reference Manual (G06.29+, H06.08+, J06.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 specified in the order in which the types are specified.
DESCRIPTION
The od command reads file (standard input by default), and writes the information stored in file to
standard output using the format specified by the first flag. If you do not specify the first flag, 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 specifies the point in the file 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 off set 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 file. If the file argument is omitted and none of the -A, -j,
-N,or-t flags is specified, the offset argument must be preceded by a + (plus sign) character.
If the first character of file is a + (plus sign) or the first character of the first file argument is
numeric, no more than two arguments are given, and none of the -A, -j, -N or -t ags is specified,
the argument is assumed to be an offset.
The label argument is interpreted as a pseudoaddress for the first byte displayed. It is shown in
parentheses following the file 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 file in octal word format, a page at a time, enter:
od a.out | more
2. To translate a file into several formats at once, enter:
od -cx a.out >a.xcd
This writes a.out in hexadecimal format (the -x flag) into the file a.xcd, giving also the
ASCII character equivalent, if any, of each byte (the -c flag).
3. To start in the middle of a file, 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 flag displays short words as signed decimal values. The -i flag used to be -s in System V.
RELATED INFORMATION
Files: locale(4).
694 Hewlett-Packard Company 527188-021