od(1)
_________________________________________________________________
od Command
octal dump
_________________________________________________________________
SYNTAX
od [ -bcdosx ] [ file ] [ [ + ]offset[ . ][ b ] ]
DESCRIPTION
Od dumps file in one or more formats as selected by the first
argument. If the first argument is missing, -o is the default.
The format options are:
-b Interpret bytes in octal.
-c Interpret bytes in ASCII. Certain non-graphic characters
appear as C escapes: null=\0, backspace=\b, form-feed=\f,
new-line=\n, return=\r, tab=\t; others appear as 3-digit
octal numbers.
-d Interpret words in unsigned decimal.
-o Interpret words in octal.
-s Interpret 16-bit words in signed decimal.
-x Interpret words in hexadecimal.
The file argument specifies which file is to be dumped. If no
file argument is specified, the standard input is used.
The offset argument specifies the offset in the file where
dumping begins. 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 of 512
bytes. If the file argument is omitted, the offset argument must
be preceded by +.
Dumping continues until end-of-file.
_________________________________________________________________
EXAMPLES
$ cat a
this is a test
DG/UX 4.00 Page 1
Licensed material--property of copyright holder(s)
od(1)
$ od -b a
0000000 164 150 151 163 040 151 163 040 141 040 164 145 163 164
012 000 0000017
Displays the file "a" on the standard output. The dump is
displayed in byte octal format.
$ od -cb a
0000000 t h i s i s a t e s t
164 150 151 163 040 151 163 040 141 040 164 145 163 164 012 000
0000017
Displays the file "a" on the standard output. The dump is
displayed in ASCII and octal formats.
$ od -x a
0000000 7468 6973 2069 7320 6120 7465 7374 0a00
0000017
Displays the file "a" on the standard output. The dump is
displayed in hexadecimal format.
_________________________________________________________________
DG/UX 4.00 Page 2
Licensed material--property of copyright holder(s)