coreutils

General Software Utilities
git clone http://git.omkov.net/coreutils
Log | Tree | Refs | README | LICENCE | Download

coreutils/man/od.1 (101 lines, 3.6 KiB) -rw-r--r-- blame download

0123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
.TH OD 1 2022-03-06 "OMKOV coreutils" "General Commands Manual"
.SH NAME
od \(em dump files in various formats
.SH SYNOPSYS
\fBod\fR [-bcdosx] [-v] [-A \fIbase\fR] [-j \fIskip\fR] [-N \fIcount\fR]
[-t \fItype\fR] [\fIfile\fR...]
.SH DESCRIPTION
Write the contents of its input files to standard output in the specified
format(s).
.SH OPTIONS
The following options are supported:
.TP
.B -A \fIbase\fR
Offset address base. The characters '\fBd\fR', '\fBo\fR', and '\fBx\fR' will
result in an address offset base of decimal, octal, or hexadecimal,
respectively. The character '\fBn\fR' will result in no offset address being
printed.
.TP
.B -b
Interpret bytes in octal. Equivalent to \fB-to1\fR.
.TP
.B -c
Interpret bytes as characters. Characters \fB\\0\fR, \fB\\b\fR, \fB\\f\fR,
\fB\\n\fR, \fB\\r\fR, and \fB\\t\fR will be displayed as escape sequences. Other
non-printable characters will be displayed as octal bytes.
.TP
.B -d
Interpret words in unsigned decimal. Equivalent to \fB-tu2\fR.
.TP
.B -j \fIskip\fR
Number of bytes to skip from the beginning of input. May be an octal or
hexadecimal number if prefixed by '\fB0\fR' or '\fB0x\fR', respectively,
otherwise it will be interpreted as a decimal number. Appending the characters
\&'\fBb\fR', '\fBk\fR', or '\fBm\fR' will cause \fIskip\fR to be interpreted as
a multiple of 512, 1024, or 1048575 bytes, respectively. Any '\fBb\fR' character
in a hexadecimal number will be interpreted as a number, not as a multiplier.
.TP
.B -N \fIcount\fR
Number of bytes to process in total. \fIcount\fR will be interpreted in the same
manner as \fIskip\fR.
.TP
.B -o
Interpret words in octal. Equivalent to \fB-to2\fR.
.TP
.B -s
Interpret words in signed decimal. Equivalent to \fB-td2\fR.
.TP
.B -t \fItype\fR
Interpret data according to specified types. \fItype\fR may contain multiple
type specifiers. Each type specifier must start with one of the characters
\&'\fBa\fR', '\fBc\fR', '\fBd\fR', '\fBf\fR', '\fBo\fR', '\fBu\fR', or
\&'\fBx\fR', specifying named character, character, signed decimal, floating
point, octal, unsigned decimal, and hecadecimal, respectively. Non-character
types may be followed by a decimal integer that specifies the number of bytes to
be interpreted at a time. Integer types (\fBd\fR, \fBo\fR, \fBu\fR, \fBx\fR) may
be followed by \fBC\fR, \fBS\fR, \fBI\fR, or \fBL\fR instead of an integer,
specifying \fBchar\fR, \fBshort\fR, \fBinteger\fR, or \fBlong\fR, respectively,
and floating-point types (\fBf\fR) may be followed by \fBF\fR, \fBD\fR, or
\&\fBL\fR, specifying \fBfloat\fR, \fBdouble\fR, or \fBlong double\fR,
respectively.
.TP
.B -v
Write all input data. If \fB-v\fR is not set, repeated lines will be output as a
single line containing only an asterisk.
.TP
.B -x
Interpret words in hexadecimal. Equivalent to \fB-tx2\fR.
.P
Multiple types can be specified using multiple \fB-bcdostx\fR options. Each
block of data is written in each of the specified formats in the order that they
were specified. If no type is specified, data will be output equivalent to
\fB-toI\fR with offset addressed printed in octal.
.TP
.B --help
Display help information.
.TP
.B --version
Display version information.
.SH OPERANDS
The following operand is supported:
.TP
.I file
A pathname of an input file. If no \fIfile\fR operands are specified, of
\fIfile\fR is a '\fB-\fR', \fIhead\fR will read from standard input.
.SH EXIT STATUS
The following exit values will be returned:
.TP
\ 0
All files were processed successfully.
.TP
>0
An error occurred.
.SH STANDARDS
The \fIod\fR utility is compliant with the IEEE Std 1003.2-1992 ("POSIX.2")
specification.
.SH COPYRIGHT
.nf
Copyright (C) 2020, Jakob Wakeling
MIT Licence (https://opensource.org/licenses/MIT)
.fi