HP-UX Reference (11i v2 04/09) - 1 User Commands N-Z (vol 2)

o
od(1) od(1)
NAME
od, xd - octal and hexadecimal dump
SYNOPSIS
od [-v][-A address_base ][
-j skip ][-N count ][-t type_string ] ... [ file ... ]
xd [-v][-A address_base ][
-j skip ][-N count ][-t type_string ] ... [ file ... ]
Supported Pre-POSIX Usage
od [-bcdosx][file ][[
+][0x]offset[.][b]]
xd [-bcdosx][file ][[
+][0x]offset[.][b]]
DESCRIPTION
od and xd concatenate one or more input files and write their contents to standard output in a user-
specified format. If file is not specified, the standard input is used.
Options and Arguments
od and xd recognize the following options and command-line arguments:
-A address_base Specify the input offset base. address_base is a single character that defines
which format the offset base is written in:
d Decimal format.
o Octal format.
x Hexadecimal format.
n Do not write the offset.
-j skip Jump over skip bytes from the beginning of the input. od seeks past the first
skip bytes in the concatenated input files. If the combined input is not at least
skip bytes long, od writes a diagnostic message to standard error and exits with
a non-zero exit status. By default, skip is interpreted as a decimal number. If
skip has a leading 0x or 0X, it is interpreted as a hexadecimal number; a lead-
ing 0 indicates that skip is an octal number.
If the value of skip is followed by a
b, k,orm, it is interpreted as a multiple of
512, 1024, or 1048576, respectively.
-N count Format no more than count bytes of input.
By default, count is interpreted as a decimal number. A leading
0x or 0X indi-
cates that count is a hexadecimal number; a leading 0 identifies an octal value.
If count bytes of input are not available (after successfully skipping if
-jskip is
specified), the input that is available is formatted.
-t type_string type_string is a string defining the types to be used when writing the input data.
The string can contain any of the following type-specification characters:
a named character ,
c character ,
d signed decimal ,
f floating point ,
o octal ,
u unsigned decimal ,
x hexadecimal ,
Type specification characters
d, f, o, u, and x can be followed by an optional
unsigned decimal integer specifying the number of bytes to be transformed by
each instance of the output type, or by an optional C, S, I,orL indicating that
the conversion should be applied to an item of type char, short, int,orlong,
respectively.
Type specification character
f can be followed by an optional F, D,or L indicat-
ing that the conversion should be applied to an item of type float, double,orlong
double, respectively.
Multiple types can be concatenated within the same type_string and multiple
-t options can be specified. Output lines are written for each type specified in
HP-UX 11i Version 2: September 2004 1 Hewlett-Packard Company Section 1693