Skip to Main Content
Unix in a Nutshell, 4th Edition
book

Unix in a Nutshell, 4th Edition

by Arnold Robbins
October 2005
Intermediate to advanced content levelIntermediate to advanced
908 pages
46h 42m
English
O'Reilly Media, Inc.
Content preview from Unix in a Nutshell, 4th Edition

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 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learning the Unix Operating System, 5th Edition

Learning the Unix Operating System, 5th Edition

John Strang, Grace Todino, Jerry Peek
UNIX and Linux System Administration Handbook, 5th Edition

UNIX and Linux System Administration Handbook, 5th Edition

Trent R. Hein, Evi Nemeth, Garth Snyder, Ben Whaley, Dan Mackin

Publisher Resources

ISBN: 0596100299Errata Page