Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

environ(5)

od(1)

NAME

od − octal dump

SYNOPSIS

od [ −bcCDdFfOoSsvXx ] [ filename ] [ [ + ] offset [ .  ] [ b ] ]

DESCRIPTION

od displays filename in one or more formats, as selected by the first argument.  If the first argument is missing, −o is default.  If no filename is specified, the standard input is used.  For the purposes of this description, "word" refers to a 16-bit unit, independent of the word size of the machine; "long word" refers to a 32-bit unit, and "double long word" refers to a 64-bit unit. 

OPTIONS

−b Interpret bytes in octal. 

−c Display single-byte characters.  Certain non-graphic characters appear as C-language escapes: null=\0, backspace=\b, form-feed=\f, new-line=\n, return=\r, tab=\t; others appear as 3-digit octal numbers.  For example: echo "hello world" | od -c
0000000   h   e   l   l   o       w   o   r   l   d  \n
0000014

−C Interpret bytes as single-byte or multibyte characters according to the current setting of the LC_CTYPE locale category.  Printable multibyte characters are written in the area corresponding to the first byte of the character; two character sequence ∗∗ are written in the area corresponding to each remaining byte in the character, as an indication that the character is continued. Non graphic characters appear as same as they would using the −c option. 

−D Interpret long words in unsigned decimal. 

−d Interpret words in unsigned decimal. 

−F Interpret double long words in extended precision. 

−f Interpret long words in floating point. 

−O Interpret long words in unsigned octal. 

−o Interpret words in octal. 

−S Interpret long words in signed decimal. 

−s Interpret words in signed decimal. 

−v Show all data (verbose). 

−X Interpret long words in hex. 

−x Interpret words in hex. 

offset specifies an offset from the beginning of filename where the display will begin.  offset is normally interpreted as octal bytes.  If . is appended, offset is interpreted in decimal.  If b is appended, offset is interpreted in blocks of 512 bytes.  If filename is omitted, offset must be preceded by +. 

The display continues until an end-of-file is reached. 

ENVIRONMENT

If any of the LC_∗ variables ( LC_CTYPE, LC_MESSAGES, LC_TIME, LC_COLLATE, LC_NUMERIC, and LC_MONETARY ) (see environ(5)) are not set in the environment, the operational behavior of od for each corresponding locale category is determined by the value of the LANG environment variable.  If LC_ALL is set, its contents are used to override both the LANG and the other LC_∗ variables.  If none of the above variables is set in the environment, the "C"  (U.S. style) locale determines how od behaves. 

LC_CTYPE
Determines how od handles characters. When LC_CTYPE is set to a valid value, od can display and handle text and filenames containing valid characters for that locale.  od can display and handle Extended Unix Code (EUC) characters where any individual character can be 1, 2, or 3 bytes wide.  od can also handle EUC characters of 1, 2, or more column widths. In the "C" locale, only characters from ISO 8859-1 are valid. 

LC_MESSAGES
Determines how diagnostic and informative messages are presented. This includes the language and style of the messages, and the correct form of affirmative and negative responses.  In the "C" locale, the messages are presented in the default form found in the program itself (in most cases, U.S. English).

SEE ALSO

environ(5)

Sun Microsystems  —  Last change: 5 Jul 1990

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026