Mac Developer Library Developer


This manual page is for Mac OS X version 10.9

If you are running a different version of Mac OS X, view the documentation locally:

  • In Terminal, using the man(1) command

Reading manual pages

Manual pages are intended as a quick reference for people who already understand a technology.

  • To learn how the manual is organized or to learn about command syntax, read the manual page for manpages(5).

  • For more information about this technology, look for other documentation in the Apple Developer Library.

  • For general information about writing shell scripts, read Shell Scripting Primer.

OD(1)                     BSD General Commands Manual                    OD(1)

     od -- octal, decimal, hex, ASCII dump

     od [-aBbcDdeFfHhIiLlOosvXx] [-A base] [-j skip] [-N length] [-t type] [[+]offset[.][Bb]] [file ...]

     The od utility is a filter which displays the specified files, or standard input if no files are speci-fied, specified,
     fied, in a user specified format.

     The options are as follows:

     -A base     Specify the input address base.  base may be one of d, o, x or n, which specify decimal,
                 octal, hexadecimal addresses or no address, respectively.

     -a          Output named characters.  Equivalent to -t a.

     -B, -o      Output octal shorts.  Equivalent to -t o2.

     -b          Output octal bytes.  Equivalent to -t o1.

     -c          Output C-style escaped characters.  Equivalent to -t c.

     -D          Output unsigned decimal ints.  Equivalent to -t u4.

     -e, -F      Output double-precision floating point numbers.  Equivalent to -t fD.

     -f          Output single-precision floating point numbers.  Equivalent to -t fF.

     -H, -X      Output hexadecimal ints.  Equivalent to -t x4.

     -h, -x      Output hexadecimal shorts.  Equivalent to -t x2.

     -I, -L, -l  Output signed decimal longs.  Equivalent to -t dL.

     -i          Output signed decimal ints.  Equivalent to -t dI.

     -j skip     Skip skip bytes of the combined input before dumping.  The number may be followed by one of
                 b, k or m which specify the units of the number as blocks (512 bytes), kilobytes and
                 megabytes, respectively.

     -N length   Dump at most length bytes of input.

     -O          Output octal ints.  Equivalent to -t o4.

     -s          Output signed decimal shorts.  Equivalent to -t d2.

     -t type     Specify the output format.  type is a string containing one or more of the following kinds
                 of type specifiers:

                 a       Named characters (ASCII).  Control characters are displayed using the following

                         000 NUL 001 SOH 002 STX 003 ETX 004 EOT 005 ENQ
                         006 ACK 007 BEL 008 BS  009 HT  00a NL  00b VT
                         00c FF  00d CR  00e SO  00f SI  010 DLE 011 DC1
                         012 DC2 013 DC3 014 DC4 015 NAK 016 SYN 017 ETB
                         018 CAN 019 EM  01a SUB 01b ESC 01c FS  01d GS
                         01e RS  01f US  020 SP  0ff DEL

                 c       Characters in the default character set.  Non-printing characters are represented
                         as 3-digit octal character codes, except the following characters, which are repre-sented represented
                         sented as C escapes:

                         NUL              \0
                         alert            \a
                         backspace        \b
                         newline          \n
                         carriage-return  \r
                         tab              \t
                         vertical tab     \v

                         Multi-byte characters are displayed in the area corresponding to the first byte of
                         the character. The remaining bytes are shown as `**'.

                         Signed decimal (d), octal (o), unsigned decimal (u) or hexadecimal (x).  Followed
                         by an optional size specifier, which may be either C (char), S (short), I (int), L
                         (long), or a byte count as a decimal integer.

                         Floating-point number.  Followed by an optional size specifier, which may be either
                         F (float), D (double) or L (long double).

     -v          Write all input data, instead of replacing lines of duplicate values with a `*'.

     Multiple options that specify output format may be used; the output will contain one line for each for-mat. format.

     If no output format is specified, -t oS is assumed.

     The LANG, LC_ALL and LC_CTYPE environment variables affect the execution of od as described in

     The od utility exits 0 on success, and >0 if an error occurs.

     The traditional -s option to extract string constants is not supported; consider using strings(1)

     hexdump(1), strings(1)

     The od utility conforms to IEEE Std 1003.1-2001 (``POSIX.1'').

     An od command appeared in Version 1 AT&T UNIX.

BSD                              July 11, 2004                             BSD

Reporting Problems

The way to report a problem with this manual page depends on the type of problem:

Content errors
Report errors in the content of this documentation with the feedback links below.
Bug reports
Report bugs in the functionality of the described tool or API through Bug Reporter.
Formatting problems
Report formatting mistakes in the online version of these pages with the feedback links below.