OD(1) | User Commands | OD(1) |
od - octal dump
/usr/bin/od [-bcCDdFfOoSsvXx] [-] [file] [offset_string]
/usr/bin/od [-bcCDdFfOoSsvXx] [-A address_base] [-j skip]
[-N count] [-t type_string]... [-] [file]...
/usr/xpg4/bin/od [-bcCDdFfOoSsvXx] [file] [offset_string]
/usr/xpg4/bin/od [-bcCDdFfOoSsvXx] [-A address_base]
[-j skip] [-N count] [-t type_string]... [file]...
The od command copies sequentially each input file to standard output and transforms the input data according to the output types specified by the -t or -bcCDdFfOoSsvXx options. If no output type is specified, the default output is as if -t o2 had been specified. Multiple types can be specified by using multiple -bcCDdFfOoSstvXx options. Output lines are written for each type specified in the order in which the types are specified. If no file is specified, the standard input is used. The [offset_string] operand is mutually exclusive from the -A, -j, -N, and -t options. For the purposes of this description, the following terms are used:
word
long word
double long word
The following options are supported:
-A address_base
-b
-c
null \0 backspace \b form-feed \f new-line \n return \r tab \t
Others appear as 3-digit octal numbers. For example:
echo "hello world" | od −c 0000000 h e l l o w o r l d \n 0000014
-c
-C
null \0 backspace \b form-feed \f new-line \n return \r tab \t
Other non-printable characters appear as one three-digit octal number for each byte in the character.
-d
-D
-f
-F
-j skip
By default, the skip option-argument is interpreted as a decimal number. With a leading 0x or 0X, the offset is interpreted as a hexadecimal number; otherwise, with a leading 0, the offset will be interpreted as an octal number. Appending the character b, k, or m to offset will cause it to be interpreted as a multiple of 512, 1024 or 1048576 bytes, respectively. If the skip number is hexadecimal, any appended b is considered to be the final hexadecimal digit. The address is displayed starting at 0000000, and its base is not implied by the base of the skip option-argument.
-N count
-o
-O
-s
-S
-t type_string
a
The following are named characters in od:
Value Name \000 nul \001 soh \002 stx \003 etx \004 eot \005 enq \006 ack \007 bel \010 bs \011 ht \012 lf \013 vt \014 ff \015 cr \016 so \017 si \020 dle \021 dc1 \022 dc2 \023 dc3 \024 dc4 \025 nak \026 syn \027 etb \030 can \031 em \032 sub \033 esc \034 fs \035 gs \036 rs \037 us \040 sp \177 del
c
The type specification characters d, f, o, u, and x can be followed by an optional unsigned decimal integer that specifies the number of bytes to be transformed by each instance of the output type.
f
d, o, u, and x
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 the order in which the type specification characters are specified.
-v
-x
-X
The following operands are supported for /usr/bin/od only:
−
file
Without the -N count option, the display continues until an end-of-file is reached.
[+][0] offset [.][b|B]
[+][0][offset] [.]
[+][0x|x][offset]
[+][0x|x] offset[B]
The following operands are supported for /usr/xpg4/bin/od only:
file
[+] [0] offset [.][b|B]
+ [offset] [.]
[+][0x][offset]
[+][0x] offset[B]
+x [offset]
+xoffset [B]
See environ(7) for descriptions of the following environment variables that affect the execution of od: LANG, LC_ALL, LC_CTYPE, LC_MESSAGES, LC_NUMERIC, and NLSPATH.
The following exit values are returned:
0
>0
See attributes(7) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
CSI | enabled |
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
CSI | enabled |
Interface Stability | Standard |
May 20, 2005 | OmniOS |