od

NAME

od - octal, decimal, hex, ascii dump

SYNOPSIS

od [-v] [-A addr-base] [-j skip] [-N count] [-t typestring]
   ... [file ...]

od [-aBbcDdeFfHhIiLlOovXx] [[+]offset[.]Bb]] file

DESCRIPTION

The od(1) utility is mapped to the hexdump(1) utility. As well as supporting the new POSIX.2 standard options, od(1) also supports most of the older Berkeley options (the second synopsis line). In the older syntax, you can supply an offset from the beginning of the file. If no file name is specified, you must place a + before the offset. The offset is assumed to be an octal value, unless it is followed by a decimal point, in which case it is assumed to be decimal. If the offset is followed by a b, it is treated as a number of 512-byte blocks; for example, 10.b represents an offset of 5120 bytes.

-A addr-base
Specify the base in which the address is presented or input; one of d, o, x or n. d is decimal, o is octal, x is hexadecimal, and n is none for output.
-a
Display bytes in ASCII control characters are translated to a three-letter abbreviation (such as soh, etx and so on).
-B
Display in unsigned octal words of two bytes.
-b
Display unsigned bytes in octal.
-c
Display bytes in ASCII control characters are translated to backslash-escape sequences or to a raw octal number.
-D
Display unsigned decimal long words of four bytes.
-d
Display unsigned decimal words of two bytes.
-e
Display floating point words of eight bytes. In printf(3) notation, they are displayed as %21.14e.
-F
Display floating point words of eight bytes. In printf(3) notation, they are displayed as %21.14e.
-f
Display floating point words of four bytes. In printf(3) notation, they are displayed as %14.7e.
-H
Display in unsigned hexadecimal long words of four bytes.
-h
Display in unsigned hexadecimal words of two bytes.
-I
Display in decimal long words of four bytes.
-j skip
Jump over skip bytes from the beginning of the input.
-L
Display in decimal long words of four bytes. (Same as -I).
-l
Display in decimal long words of four bytes. (Same as -I).
-N count
Format no more than count bytes of data.
-O
Display in unsigned octal long words of four bytes.
-o
Display in unsigned octal words of two bytes.
-s
Display in signed decimal words of two bytes.
-S
Display in signed decimal long words of four bytes.
-t typestring
Specify one or more output types. Values for typestring can be:
a
ASCII characters from the ISO 646 character set.
c
Characters; non-printable characters are displayed as backslash sequences.
d[n]
Signed decimal; the single digit n is optional and specifies how many bytes to use. The size of n must be the size of a char, short, int, or long. The default is the size of an int.
f[n]
Floating point; the single digit n is optional and specifies how many bytes to use. The size of n must be the size of a float, double, or a long double. The default is the size of a double.
o[n]
Octal; the single digit n is optional and specifies how many bytes to use. The size of n must be the size of a char, short, int, or long. The default is the size of an int.
u[n]
Unsigned decimal; the single digit n is optional and specifies how many bytes to use. The size of n must be the size of a char, short, int, or long. The default is the size of an int.
x[n]
Hexadecimal; the single digit n is optional and specifies how many bytes to use. The size of n must be the size of a char, short, int, or long. The default is the size of an int.

The default value is -t o2
-v
Write all input data. Without this option, od(1) displays a single asterisk (*) for a line that is identical to the preceding line except for address.
-x
Display in unsigned hexadecimal words of two bytes (same as -h).
-X
Display in unsigned hexadecimal long words of four bytes (same as -H).

The od(1) utility is actually the hexdump(1) utility invoked as od(1). It does not provide compatibility for the -P, -p, or -w options, or for the "label" component of the offset syntax.

SEE ALSO

hexdump(1)