📄 od.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><!-- Copyright 1997 The Open Group, All Rights Reserved --><title>od</title></head><body bgcolor=white><center><font size=2>The Single UNIX ® Specification, Version 2<br>Copyright © 1997 The Open Group</font></center><hr size=2 noshade><h4><a name = "tag_001_014_1593"> </a>NAME</h4><blockquote>od - dump files in various formats</blockquote><h4><a name = "tag_001_014_1594"> </a>SYNOPSIS</h4><blockquote><pre><code>od <b>[</b>-v<b>][</b>-A <i>address_base</i><b>][</b>-j <i>skip</i><b>][</b>-N <i>count</i><b>][</b>-t <i>type_string</i><b>]</b>...<b>[</b><i>file</i>...<b>]</b>od <b>[</b>-bcdosx<b>][</b><i>file</i><b>] [[</b>+<b>]</b><i>offset</i><b>[</b>.<b>][</b>b<b>]]</b></code></pre></blockquote><h4><a name = "tag_001_014_1595"> </a>DESCRIPTION</h4><blockquote>The<i>od</i>utility will write the contents of its input filesto standard output in a user-specified format.</blockquote><h4><a name = "tag_001_014_1596"> </a>OPTIONS</h4><blockquote>The<i>od</i>utility supports the <b>XBD</b> specification, <a href="../xbd/utilconv.html#usg"><b>Utility Syntax Guidelines</b> </a> ,except that the order of presentation of the<b>-t</b>optionsand the<b>-bcdosx</b>optionsis significant.<p>The following options are supported:<dl compact><dt><b>-A </b><i>address_base</i><dd>Specify the input offset base (see the EXTENDED DESCRIPTION section).The<i>address_base</i>option-argument must be a character.The charactersd,oandxspecify that the offset basewill be written in decimal, octal or hexadecimal, respectively.The characternspecifies that the offset will not be written.<dt><b>-b</b><dd>Interpret bytes in octal.This is equivalent tot<b>-o1</b>.<dt><b>-c</b><dd>Interpret bytes as characters specified by the current setting of theLC_CTYPE category.Certain non-graphic characters appear as C escapes:NUL=<b>\0</b>,BS=<b>\b</b>,FF=<b>\f</b>,NL=<b>\n</b>,CR=<b>\r</b>,HT=<b>\t</b>;others appear as 3-digit octal numbers.<dt><b>-d</b><dd>Interpret<i>word</i>s(two-byte units)in unsigned decimal.This is equivalent tot<b>-u2</b>.<dt><b>-j </b><i>skip</i><dd>Jump over<i>skip</i>bytes from the beginning of the input.The<i>od</i>utility will read or seek past the first<i>skip</i>bytes in the concatenated input files.If the combined input is not atleast<i>skip</i>bytes long, the<i>od</i>utility will write a diagnosticmessage to standard error and exit with a non-zero exit status.By default, the<i>skip</i>option-argumentis interpreted as a decimal number.With a leading0xor0X,the offset isinterpreted as a hexadecimal number; otherwise, with a leading0,the offset will be interpreted as an octal number.Appending the characterb,kormto offset will cause it to be interpreted as a multiple of 512,1024 or 1048576 bytes, respectively.If the<i>skip</i>number is hexadecimal, any appendedbis considered to be the final hexadecimal digit.<dt><b>-N </b><i>count</i><dd>Format no more than<i>count</i>bytes of input.By default,<i>count</i>is interpreted as a decimal number.With a leading0xor0X,<i>count</i>is interpreted as ahexadecimal number; otherwise, with a leading0,it is interpreted as an octal number.If<i>count</i>bytes of input (after successfully skipping, if<b>-j</b> <i>skip</i>is specified) are not available, it will not be consideredan error; the<i>od</i>utility will format the input that is available.<dt><b>-o</b><dd>Interpret<i>word</i>s(two-byte units)in octal.This is equivalent tot<b>-o2</b>.<dt><b>-s</b><dd>Interpret<i>word</i>s(two-byte units)in signed decimal.This is equivalent tot<b>-d2</b>.<dt><b>-t </b><i>type_string</i><dd>Specify one or more output types (see the EXTENDED DESCRIPTIONsection).The<i>type_string</i>option-argument must be a string specifyingthe types to be used when writing the input data.The string must consist of the type specification charactersa,c,d,f,o,uandx,specifying named character,character, signed decimal, floating point, octal, unsigneddecimal and hexadecimal, respectively.The type specification charactersd,f,o,uandxcan be followed by anoptional unsigned decimal integer that specifies thenumber of bytes to be transformed by each instance of the output type.The type specification characterfcan be followed by an optionalF,DorLindicating that the conversion should beapplied to an item of type<i>float</i>,<i>double</i>or<i>long double</i>,respectively.The type specification charactersd,o,uandxcan be followed by an optionalC,S,IorLindicating that theconversion should be applied to an item of type<b>char</b>,<b>short</b>,<b>int</b>or<b>long</b>,respectively.Multiple types can be concatenated within the same<i>type_string</i>and multiple<b>-t</b>options can be specified.Output lines are written for each type specified in the orderin which the type specification characters are specified.<dt><b>-v</b><dd>Write all input data.Without the<b>-v</b>option, any number of groups of output lines, which would be identical to theimmediately preceding group of output lines (except forthe byte offsets), will be replaced with a linecontaining only an asterisk(*).<dt><b>-x</b><dd>Interpret<i>word</i>s(two-byte units)in hexadecimal.This is equivalent tot<b>-x2</b>.</dl><p>Multiple typescan be specified by using multiple<b>-bcdostx</b>options.Output lines are written for each type specified in the orderin which the types are specified.</blockquote><h4><a name = "tag_001_014_1597"> </a>OPERANDS</h4><blockquote>The following operands are supported:<dl compact><dt><i>file</i><dd>A pathname of a file to be written.If no file operandsare specified, the standard input will be used.If the first character of<i>file</i>is a plus sign(+)or the first character of the first fileoperand is numeric,no more than two operands are given,and none of the<b>-A</b>,<b>-j</b>,<b>-N</b>or<b>-t</b>options is specified,the operand is assumed to be an<i>offset</i>.<dt><b>[+]</b><i>offset</i><b>[.][b]</b><dd>The<i>offset</i>operand specifies the offsetin the file where dumping is to commence.This operand is normally interpreted as octal bytes.If . is appended, the offset is interpreted indecimal.Ifbis appended, the offset is interpreted inunits of 512 bytes.If the<i>file</i>argument is omitted,and none of the<b>-A</b>,<b>-j</b>,<b>-N</b>or<b>-t</b>options is specified,the offset argument must be preceded by +.</dl></blockquote><h4><a name = "tag_001_014_1598"> </a>STDIN</h4><blockquote>The standard input is used only if no<i>file</i>operands are specified.See the INPUT FILES section.</blockquote><h4><a name = "tag_001_014_1599"> </a>INPUT FILES</h4><blockquote>The input files can be any file type.</blockquote><h4><a name = "tag_001_014_1600"> </a>ENVIRONMENT VARIABLES</h4><blockquote>The following environment variables affect the execution of<i>od</i>:<dl compact><dt><i>LANG</i><dd>Provide a default value for the internationalisation variablesthat are unset or null.If<i>LANG</i>is unset or null, the corresponding value from theimplementation-dependent default locale will be used.If any of the internationalisation variables contains an invalid setting, theutility will behave as if none of the variables had been defined.<dt><i>LC_ALL</i><dd>If set to a non-empty string value,override the values of all the other internationalisation variables.<dt><i>LC_CTYPE</i><dd>Determine thelocale for the interpretation of sequences of bytes of text data ascharacters (for example, single- as opposed to multi-byte charactersin arguments and input files).<dt><i>LC_MESSAGES</i><dd>Determine the locale that should be used to affectthe format and contents of diagnosticmessages written to standard error.<dt><i>LC_NUMERIC</i><dd>Determine the localefor selecting the radix character used whenwriting floating-point formatted output.<dt><i>NLSPATH</i><dd>Determine the location of message cataloguesfor the processing of<i>LC_MESSAGES .</i></dl></blockquote><h4><a name = "tag_001_014_1601"> </a>ASYNCHRONOUS EVENTS</h4><blockquote>Default.</blockquote><h4><a name = "tag_001_014_1602"> </a>STDOUT</h4><blockquote>See the EXTENDED DESCRIPTION section.</blockquote><h4><a name = "tag_001_014_1603"> </a>STDERR</h4><blockquote>Used only for diagnostic messages.</blockquote><h4><a name = "tag_001_014_1604"> </a>OUTPUT FILES</h4><blockquote>None.</blockquote><h4><a name = "tag_001_014_1605"> </a>EXTENDED DESCRIPTION</h4><blockquote>The<i>od</i>utility copies sequentially each input file to standard output,transforming the input data according to the output types specifiedby the<b>-t</b>optionsor the<b>-bcdosx</b>options.If no output type is specified, the default outputis as if<b>-t o2</b>had been specified.<p>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -