|
|
od [ -bcdhosx ] [ file ] [ [ + ] offset [ . ] [ b ] ]
By default, the argument skip is considered to be a decimal number. With a leading 0x or 0X, skip is evaluated as a hexadecimal number. With a leading 0, skip is evaluated as an octal number. Any one of the following characters can be appended to the skip argument with the listed effect:
Note that a terminating b in a hexadecimal argument is considered to be the last digit of the argument.
By default, the argument count is considered to be a decimal number. With a leading 0x or 0X, count is evaluated as a hexadecimal number. With a leading 0, count is evaluated as an octal number. If count bytes of input are not available after skipping any bytes specified by the -j option, od outputs the available data and exits without an error.
The type_string is composed of one or more type specifiers. Each type specifier is one of the characters in the following table, optionally followed by a modifier character:
specifier character | optional modifier | type specified | default number of bytes |
---|---|---|---|
a | named character | 1 | |
c | character | 1 | |
d | 1,C,2,S,4,I or L | signed decimal | 4 |
f | 4,F,8,D or L | floating point | 8 |
o | 1,C,2,S,4,I or L | octal | 4 |
u | 1,C,2,S,4,I or L | unsigned decimal | 4 |
x | 1,C,2,S,4,I or L | hexadecimal | 4 |
The optional modifier can be used to indicate the number of bytes to be converted by the specifier. It is either a number or one of the characters C, S, I, L, F or D, which corresponds to the number of bytes in a char, short, int, long, float or double respectively.
More than one type specifier may be specified in a
type_string, and there may be multiple -t
options. Output lines are written for each specifier in the
order in which they are supplied.
The offset argument specifies the offset in the file to display from. This argument is normally interpreted as octal bytes. If ``.'' is appended, the offset is interpreted in decimal. If ``b'' is appended, the offset is interpreted in blocks. If the file argument is omitted, the offset argument must be preceded by ``+''.
The display continues until end-of-file.
ISO/IEC DIS 99452:1992, Information technology Portable Operating System Interface (POSIX) Part 2: Shell and Utilities (IEEE Std 1003.21992);
AT&T SVID Issue 2;
X/Open CAE Specification, Commands and Utilities, Issue 4, 1992.