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. ...
Get Mac OS X Panther in a Nutshell, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.