[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
od
: Write files in octal or other formats
od
writes an unambiguous representation of each file
(`-' means standard input), or standard input if none are given.
Synopses:
od [option]... [file]... od --traditional [file] [[+]offset [[+]label]] |
Each line of output consists of the offset in the input, followed by
groups of data from the file. By default, od
prints the offset in
octal, and each group of file data is two bytes of input printed as a
single octal number.
The program accepts the following options. Also see 2. Common options.
The default is octal.
bytes
are interpreted as for the `-j' option.
If n is omitted with `--strings', the default is 3. On
older systems, GNU od
instead supports an obsolete
option `-s[n]', where n also defaults to 3.
POSIX 1003.1-2001 (see section 2.5 Standards conformance) does not allow
`-s' without an argument; use `--strings' instead.
od
writes one copy
of each output line using each of the data types that you specified,
in the order that you specified.
Adding a trailing "z" to any type specification appends a display of the ASCII character representation of the printable characters to the output line generated by the type specification.
The type a
outputs things like `sp' for space, `nl' for
newline, and `nul' for a null (zero) byte. Type c
outputs
` ', `\n', and \0
, respectively.
Except for types `a' and `c', you can specify the number of bytes to use in interpreting each number in the given data type by following the type indicator character with a decimal integer. Alternately, you can specify the size of one of the C compiler's built-in data types by following the type indicator character with one of the following characters. For integers (`d', `o', `u', `x'):
For floating point (f
):
od
outputs only
the first line, and puts just an asterisk on the following line to
indicate the elision.
n
input bytes per output line. This must be a multiple of
the least common multiple of the sizes associated with the specified
output types.
If this option is not given at all, the default is 16. If n is
omitted with `--width', the default is 32. On older systems,
GNU od
instead supports an obsolete option
`-w[n]', where n also defaults to 32. POSIX
1003.1-2001 (see section 2.5 Standards conformance) does not allow `-w'
without an argument; use `--width' instead.
The next several options are shorthands for format specifications.
GNU od
accepts any combination of shorthands and format
specification options. These options accumulate.
od
accepted. The following syntax:
od --traditional [file] [[+]offset[.][b] [[+]label[.][b]]] |
can be used to specify at most one file and optional arguments specifying an offset and a pseudo-start address, label. By default, offset is interpreted as an octal number specifying how many input bytes to skip before formatting and writing. The optional trailing decimal point forces the interpretation of offset as a decimal number. If no decimal is specified and the offset begins with `0x' or `0X' it is interpreted as a hexadecimal number. If there is a trailing `b', the number of bytes skipped will be offset multiplied by 512. The label argument is interpreted just like offset, but it specifies an initial pseudo-address. The pseudo-addresses are displayed in parentheses following any normal address.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |