OD(1)

NAME
od - octal dump

SYNOPSIS
od [-bcCdDfFoOsSvxX] [file] [[+]offset[.][b]]
od [-v] [-A address_base] [-j skip] [-N count] [-t type_string] ... [file ...]

DESCRIPTION
Od dumps file in one or more formats as selected by the option arguments. If no format specification is present, -o is default. The meanings of the option arguments are:

-b  Interpret bytes in octal.

-c  Interpret characters. Certain non-graphic characters appear as C escapes: null=\0, backspace=\b, formfeed=\f, newline=\n, return=\r, tab=\t; others appear as 3-digit octal numbers. For a multibyte character, the graphical representation is printed for its first byte, remaining bytes are marked **.

-d  Interpret unsigned two-byte words in decimal.

-D  Interpret unsigned four-byte words in decimal.

-f  Interpret floating point format as single precision.

-F  Interpret floating point format as double precision.

-o  Interpret two-byte words in octal.

-O  Interpret four-byte words in octal.

-s  Interpret signed two-byte words in decimal.

-S  Interpret signed four-byte words in decimal.

-v  Print identical groups of output lines that immediately follow each other instead of abbreviating all but the first one by printing a single * character.

-x  Interpret two-byte words in hexadecimal.

-X  Interpret four-byte words in hexadecimal.

The following option is supported as an extension:

-C  Prints the input data interpreted as characters as another column right next to the regular output. Non-printable characters are replaced by periods.

The file argument specifies which file is to be dumped. If no file argument is specified, the standard input is used. If more than one file argument is specified, the concatenation of all files without an intervening separator is dumped.

The offset argument specifies the offset in the file where dumping is to commence. This argument is normally interpreted as octal bytes. If `.' is appended, the offset is interpreted in decimal. If `b' is appended, the offset is interpreted in blocks of 512 bytes. If the file argument is omitted, the offset argument must be preceded by `+' with /usr/local/heirloom/usr/5bin/posix/od.

The following options have been introduced by POSIX.2. If any of these options is present, an offset-like argument is always interpreted as the name of a file to be dumped.

-A address_base
    Sets the format of the file offset printed in the first column. Valid values for address_base are:

    d   Print offset as decimal.

    n   Print no offset column.

    o   Print offset as octal (default).

    x   Print offset as hexadecimal.

-j skip
    Skip skip bytes of input, where skip may be either a decimal number, an octal number preceded by 0, or a hexadecimal number preceded by 0x or 0X. If the last character of skip is b (if not a hexadecimal number), k, or m, the value is multiplied by 512, 1024, or 1048576, respectively.

-N count
    Terminate processing after count bytes of input, where count may be either a decimal number, an octal number preceded by 0, or a hexadecimal number preceded by 0x or 0X.

-t type_string
    Set output format. type_string may consist of one or more specifications as follows:

    a   Print characters, ignoring the most significant bit. ASCII control characters are printed as their names, other nonprintable characters are printed as octal bytes.

    c   Print characters. Non-printable characters are either printed as escape sequences `\0', `\a', `\b', `\f', `\n', `\r', `\t', `\v' or as octal bytes. For a multibyte character, the graphical representation is printed for its first byte, remaining bytes are marked **.

    d[1|2|4|8|C|S|I|L]
        Print signed decimal words, with the word length indicated by the second character (1 one byte per word, 2 two bytes per word, 4 four bytes per word, 8 eight bytes per word, C the size of the C language `char' data type, S the size of the C language `short' data type, I the size of the C language `int' data type, and L the size of the C language `long' data type). The default is the machine word length.

    f[4|8|F|D|L]
        Print floating point format, with the precision indicated by the second character (4 and F single precision, 8, D, and L double precision). The default is double precision.

    o[1|2|4|8|C|S|I|L]
        Print octal words, with the word length indicated by the second character as described for d above.

    u[1|2|4|8|C|S|I|L]
        Print unsigned decimal words, with the word length indicated by the second character as described for d above.

    x[1|2|4|8|C|S|I|L]
        Print hexadecimal words, with the word length indicated by the second character as described for d above.

Unless the -N option is given, dumping continues until end-of-file.

ENVIRONMENT VARIABLES

LANG, LC_ALL
    See locale(7).

LC_CTYPE
    Determines the mapping of bytes to characters for the -c and -tc options.