oreilly.comSafari Books Online.Conferences.


Linux in a Nutshell

This directory of Linux commands is from Linux in a Nutshell, 5th Edition.

Click on any of the 687 commands below to get a description and list of available options. All links in the command summaries point to the online version of the book on Safari Bookshelf.

Buy it now, or read it online on Safari Bookshelf.


od [options] [files] od --traditional [file] [[+] offset [[+] label] ]

Dump the specified files to standard output. The default is to dump in octal format, but other formats can be specified. With multiple files, concatenate them in the specified order. If no files are specified or file is -, read from standard input. With the second form, using the --traditional option, only one file can be specified.


For the following options, see the later Arguments section for an explanation of the arguments bytes, size, and type. If no options are specified, the default is -A o -t d2 -w 16.


Print as named characters. Same as -ta.

-A radix, --address-radix=radix

Specify the radix (base) for the file offsets printed at the beginning of each output line. The possible values are:




None; do not print an offset.


Octal; the default.




Print as octal bytes. Same as -toC.


Print as ASCII characters or backslash escapes. Same as -tc.


Print as unsigned decimal shorts. Same as -tu2.


Print as floating-point. Same as -tfF.


Print as hexadecimal shorts. Same as -tx2.


Display a usage message and exit.


Print as decimal shorts. Same as -td2.

-j bytes, --skip-bytes=bytes

Skip the specified number of input bytes before starting.


Print as decimal longs. Same as -td4.

-N bytes, --read-bytes=bytes

Format and print only the specified number of input bytes.


Print as octal shorts. Same as -to2.

-s bytes, --strings[=bytes]

Output strings that are at least bytes ASCII graphic characters long (default is 3 if bytes is not specified for --strings).

-t type, --format=type

Format the output according to type, where type is a string of one or more of the characters listed in the Arguments section. If more than one type is specified, each output line is written once in each specified format. If a trailing z is appended to type, od appends any printable characters to the end of each output line.


Accept arguments in the traditional form, which takes a single file specification with an optional offset and label, as shown in the second form of the command. offset is an octal number indicating how many input bytes to skip over. label specifies an initial pseudo-address, which is printed in parentheses after any normal address. Both the offset and the label can begin with an optional plus sign (+), and can have a trailing decimal point (.) to force the offset to be interpreted as a decimal number and/or a trailing b to multiply the number of bytes skipped by offset by 512.

-v, --output-duplicates

Print all lines, including duplicates. By default, only the first of a series of identical lines is printed, and an asterisk is printed at the beginning of the following line to indicate that there were duplicates.


Display version information and exit.

-w bytes, --width[=bytes]

Dump bytes input bytes to each output line. Defaults to 16 if this option is omitted. If --width is specified but bytes is omitted, the default is 32.


Print as hexadecimal shorts. Same as -tx2.



Specify a number of bytes. Treated as hexadecimal if it begins with 0x or 0X, as octal if it begins with 0, or as decimal otherwise. Append b to multiply by 512, k to multiply by 1024, or m to multiply by 10248576.


Specified as part of type to indicate how many bytes to use in interpreting each number. Types a and c do not take a size. For other types, size is a number. For type f, size can also be one of the following:






Long double.

For the remaining types (d, o, u, x), size can be one of the following in addition to a number:










Specify the format type. The possible types are:


Named character.


ASCII character or backslash escape.


Signed decimal, with size bytes per integer.


Floating point, with size bytes per integer.


Octal, with size bytes per integer.


Unsigned decimal, with size bytes per integer.


Hexadecimal, with size bytes per integer.

Linux Resources
  • Linux Online
  • The Linux FAQ
  • Linux Kernel Archives
  • Kernel Traffic

  • Sponsored by: