📄 0343-0346.html
字号:
</A></H3>
<P>od—Dump FILES in octal and other FORMATS
</P>
<P><B>SYNOPSIS</B></P>
<!-- CODE //-->
<PRE>od [_abcdfhiloxv] [_s[bytes]] [_w[bytes]] [_A radix] [_j bytes] [_N bytes]
[_t type] [--skip_bytes=bytes] [--address_radix=radix] [--read_bytes=bytes]
[--format=type] [--output_duplicates] [--strings[=bytes]] [--width[=bytes]]
[--traditional] [--help] [--version] [file...]
</PRE>
<!-- END CODE //-->
<P><B>DESCRIPTION</B></P>
<P>This manual page documents the GNU version of
od. od writes to the standard output the contents of the given FILES, or
of the standard input if the name _ is given. Each line of the output consists of the offset in the input file in the
leftmost column of each line, followed by one or more columns of data from the file, in a format controlled by the OPTIONS.
By default, od prints the file offsets in octal and the file data as two-byte octal numbers.
</P>
<P><B>OPTIONS</B></P>
<TABLE>
<TR><TD>
_A, --address_radix=radix
</TD><TD>
Select the base in which file offsets are printed.
radix can be one of the following:
</TD></TR></TABLE>
<BLOCKQUOTE>
<TABLE>
<TR><TD>
d
</TD><TD>
Decimal<BR>
</TD></TR><TR><TD>
o
Octal<BR>
</TD><TD>
x
</TD></TR><TR><TD>
Hexadecimal<BR>
</TD><TD>
n
</TD></TR><TR><TD>
None (do not print offsets)<BR>
</TD><TD>
</TD></TR><TR><TD>
The default is octal.
</TD></TR></TABLE>
</BLOCKQUOTE>
<TABLE>
<TR><TD>
_j, --skip_bytes=bytes
</TD><TD>
Skip bytes input bytes before formatting and writing. If
bytes begins with 0x or 0X, it is interpreted in hexadecimal; otherwise, if it begins with
0, in octal; otherwise, in decimal. Appending b multiplies it by 512,
k by 1024, and m by 1048576.
</TD></TR><TR><TD>
_N, --read_bytes=bytes
</TD><TD>
Only output up to
bytes bytes of each input file. Any prefixes and suffixes on
bytes are interpreted as for the _j option.
</TD></TR><TR><TD>
_t, --format=type
</TD><TD>
Select the format in which to output the file data.
type is a string of one or more of the following type indicator characters. If you include more than one type indicator character
in a single type string or use this option more than once,
od writes one copy of each output line using each of the data types that you specified, in the order that you specified.
</TD></TR>
</TABLE>
<BLOCKQUOTE>
<TABLE>
<TR><TD>
a
</TD><TD>
Named character<BR>
</TD></TR><TR><TD>
c
</TD><TD>
ASCII character or backslash escape<BR>
</TD></TR><TR><TD>
d
</TD><TD>
Signed decimal<BR>
</TD></TR><TR><TD>
f
</TD><TD>
Floating point<BR>
</TD></TR><TR><TD>
o
</TD><TD>
Octal<BR>
</TD></TR><TR><TD>
u
</TD><TD>
Unsigned decimal<BR>
</TD></TR><TR><TD>
x
</TD><TD>
Hexadecimal
</TD></TR></TABLE>
</BLOCKQUOTE>
<P>
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):
</P>
<BLOCKQUOTE>
<TABLE>
<TR><TD>
C
</TD><TD>
char<BR>
</TD></TR><TR><TD>
S
</TD><TD>
short<BR>
</TD></TR><TR><TD>
I
</TD><TD>
int<BR>
</TD></TR><TR><TD>
L
</TD><TD>
long
</TD></TR></TABLE>
</BLOCKQUOTE>
<A NAME="PAGENUM-346"><P>Page 346</P></A>
<TABLE>
<TR><TD>
</TD><TD>
For floating point (f):
</TD></TR><TR><TD>
F
</TD><TD>
float<BR>
</TD></TR><TR><TD>
D
</TD><TD>
double<BR>
</TD></TR><TR><TD>
L
</TD><TD>
long double
</TD></TR></TABLE>
<TABLE>
<TR><TD>
_v, --output_duplicates
</TD><TD>
Output consecutive lines that are identical. By default, when two or more
consecutive output lines would be equal, od outputs only the first line, and puts just an asterisk on
the following line to indicate that identical lines have been elided.
</TD></TR><TR><TD>
_s, --strings[=bytes]
</TD><TD>
Instead of the normal output, output only string constants in the input, which are a run
of at least bytes ASCII graphic (or formatting) characters, terminated by a
NUL. If bytes is omitted, it defaults to 3.
</TD></TR><TR><TD>
_w, --width[=bytes]
</TD><TD>
The number of input
bytes to format per output line. It must be a multiple of the
least common multiple of the sizes associated with the specified output types. If
bytes is omitted, it defaults to 32. If this option is not given, it defaults to
16.
</TD></TR><TR><TD>
--help
</TD><TD>
Print a usage message and exit with a nonzero status.
</TD></TR><TR><TD>
--version
</TD><TD>
Print version information on standard output, then exit.
</TD></TR>
</TABLE>
<P>The next several OPTIONS map the old, pre-POSIX format specification OPTIONS to the corresponding POSIX format
specs. GNU od accepts any combination of old- and new-style OPTIONS. Format specification OPTIONS accumulate.
</P>
<TABLE>
<TR><TD>
_a
</TD><TD>
Output as named characters. Equivalent to
_t a.
</TD></TR><TR><TD>
_b
</TD><TD>
Output as octal bytes. Equivalent to _t
oC.
</TD></TR><TR><TD>
_c
</TD><TD>
Output as ASCII characters or backslash escapes. Equivalent to
_t c.
</TD></TR><TR><TD>
_d
</TD><TD>
Output as unsigned decimal shorts. Equivalent to
_t u2.
</TD></TR><TR><TD>
_f
</TD><TD>
Output as floats. Equivalent to _t fF.
</TD></TR><TR><TD>
_h
</TD><TD>
Output as hexadecimal shorts. Equivalent to
_t x2.
</TD></TR><TR><TD>
_i
</TD><TD>
Output as decimal shorts. Equivalent to _t
d2.
</TD></TR><TR><TD>
_l
</TD><TD>
Output as decimal longs. Equivalent to _t
d4.
</TD></TR><TR><TD>
_o
</TD><TD>
Output as octal shorts. Equivalent to _t
o2.
</TD></TR><TR><TD>
_x
</TD><TD>
Output as hexadecimal shorts. Equivalent to
_t x2.
</TD></TR><TR><TD>
--traditional
</TD><TD>
Recognize the pre-POSIX nonoption arguments that some older versions of
od accepted. The following syntax:
</TD></TR></TABLE>
<BLOCKQUOTE>
<!-- CODE SNIP //-->
<PRE>od --traditional [file] [[+]offset[.][b]
[[+]label[.][b]]]
</PRE>
<!-- END CODE SNIP //-->
<P>
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.
</P>
</BLOCKQUOTE>
<P>GNU Text Utilities
</P>
<H3><A NAME="ch01_ 200">
passwd
</A></H3>
<P>passwd—Change password
</P>
<P><B>SYNOPSIS</B></P>
<!-- CODE SNIP //-->
<PRE>passwd [ name ]</PRE>
<!-- END CODE SNIP //-->
<P><CENTER>
<a href="0342-0342.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="0347-0349.html">Next</A></CENTER></P>
</td>
</tr>
</table>
<!-- begin footer information -->
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -