O'Reilly logo

Mac OS X Tiger in a Nutshell by Jason McIntosh, Chuck Toporek, Chris Stone, Andy Lester

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 [-c] [-a] [-b] [-B] [-o] [-O] [-d] [-D] [-i] [-I] [-l] [-L] [-f] [-e]
[-F] [-h] [-x] [-H] [-X] [-v] [filename]

Prints the contents of a file to standard output in a variety of formats. (If no filename is specified, it acts on the contents of standard input.) The name is an acronym for octal dump, from its default behavior of displaying files as series of octal numbers.

od has been deprecated in favor of hexdump; in fact, the two binaries are hard-linked to the same data. However, traditional od syntax applies when invoked by that name. See the hexdump manpage for more.

Options

-a

Display content in 1-byte chunks of ASCII characters, hexadecimal numbers, and short strings representing control characters.

-b

Display content in 1-byte chunks of octal numbers.

-B

Display content in 2-byte chunks of octal numbers. This is the default.

-c

Display content in 1-byte chunks of ASCII characters, octal numbers, and escape sequences representing control characters. This is probably the most commonly used option.

-d

Display content in 2-byte chunks of unsigned decimal integers.

-D

Display content in 4-byte chunks of unsigned decimal integers.

-e

Display content in 8-byte chunks of decimal floating-point numbers.

-f

Display content in 4-byte chunks of decimal floating-point numbers.

-F

Same as -e.

-h

Display content in 2-byte chunks of hexadecimal numbers.

-H

Display content in 4-byte chunks of hexadecimal numbers.

-i

Display content in 2-byte chunks of signed decimal integers. ...

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