O'Reilly logo

Unix in a Nutshell, 4th Edition by Arnold Robbins

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

od

Synopsis

    od [options] [file] [[+] offset[. | b]]

Octal dump; produce a dump (normally octal) of the named file. file is displayed from its beginning, unless you specify an offset (normally in octal bytes). In the following options, a "word" is a 16-bit unit.

Common Options

-Abase, --address-radix=base

Indicate how the offset should be written. Values for base are d for decimal, o for octal, x for hexadecimal, or n for no offset.

-b

Display bytes as octal.

-c

Display bytes as ASCII.

-d

Display words as unsigned decimal.

-f

Display 32-bit words as floating point.

-jskip, --skip-bytes=skip

Jump over skip bytes from the beginning of the input. skip can have a leading 0 or 0x for it to be treated as an octal or hexadecimal value. It can have a trailing b, k, or m to be treated as a multiple of 512, 1024, or 1,048,576 bytes.

-Ncount, --read-bytes=count

Process up to count input bytes.

-o

Display words as unsigned octal (the default).

-ttype_string, --format=type_string

Specify one or more output types. See the "Common Type Strings" section later in this entry.

-v, --output-duplicates

Verbose; show all data. Without this, duplicate lines print as *.

-x

Display words as hexadecimal.[*]

+

Required before offset if file isn't specified.

Solaris and Mac OS X Options

-D

Display 32-bit words as unsigned decimal.

-F

Display 64-bit words as extended precision.

-O

Display 32-bit words as unsigned octal.

-s

Display words as signed decimal.

-X

Display 32-bit words as hexadecimal.

GNU/Linux and Mac OS X ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required