⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dd.html

📁 unix 下的C开发手册,还用详细的例程。
💻 HTML
📖 第 1 页 / 共 2 页
字号:
newline character.<dt><b>lcase</b><dd>Map upper-case characters specified by the LC_CTYPE keyword<b>tolower</b>to the corresponding lower-case character.Charactersfor which no mapping is specified will not be modified by thisconversion.The<b>lcase</b>and<b>ucase</b>symbols are mutually exclusive.<dt><b>ucase</b><dd>Map lower-case characters specified by the LC_CTYPE keyword<b>toupper</b>to the corresponding upper-case character.Charactersfor which no mapping is specified will not be modified by thisconversion.<dt><b>swab</b><dd>Swap every pair of input bytes.If the current input record is an odd number of bytes,the last byte in the input record is ignored.<dt><b>noerror</b><dd>Do not stop processing on an input error.When an input error occurs, a diagnosticmessage will be written on standard error, followed by the currentinput and output block counts in the same format as used atcompletion (see the STDERR section).If the<b>sync</b>conversion isspecified, the missing input will be replaced with null bytes andprocessed normally; otherwise, the input block will be omitted fromthe output.<dt><b>notrunc</b><dd>Do not truncate the output file.Preserve blocks in theoutput file not explicitly written by this invocationof the<i>dd</i>utility.(See also the preceding<b>of=</b>fileoperand.)<dt><b>sync</b><dd>Pad every input block to the size of the<b>ibs=</b>buffer, appending null bytes.(If either<b>block</b>or<b>unblock</b>is also specified, appendspacecharacters, rather than null bytes.)</dl><p></dl><p>The behaviour is unspecified if operands other than<b>conv=</b>are specified more than once.<p>For the<b>bs=</b>,<b>cbs=</b>,<b>ibs=</b>and<b>obs=</b>operands, the application must supply anexpression specifying a size in bytes.The expression,<i>expr</i>,can be:<ol><p><li>a positive decimal number<p><li>a positive decimal number followed byk,specifying multiplication by 1024<p><li>a positive decimal number followed byb,specifying multiplication by 512<p><li>two or more positive decimal numbers (with or withoutkorb)separated byx,specifying the product of the indicated values.<p></ol><p>All of the operands will be processed before any input is read.<p>The following two tables display the octal number charactervalues used for the<b>ascii</b>and<b>ebcdic</b>conversions (first table)and for the<b>ibm</b>conversion (second table).In both tables, the ASCII values are the row and columnheaders and the EBCDIC values are found at their intersections.For example, ASCII 0012 (LF) is the second row, third column,yielding 0045 in EBCDIC.The inverted tables (for EBCDIC to ASCII conversion)are not shown, but are in one-to-one correspondencewith these tables.The differences between the two tables arehighlighted by small boxes drawn around five entries.<br><img src="../images/ascebc.gif"><h6 align=center><xref table="ASCII to EBCDIC Conversion"><a name="tagt_2">&nbsp;</a></xref>Table: ASCII to EBCDIC Conversion</h6><xref type="7" name="ascebc"></xref><br><img src="../images/ascibm.gif"><h6 align=center><xref table="ASCII to IBM EBCDIC Conversion"><a name="tagt_3">&nbsp;</a></xref>Table: ASCII to IBM EBCDIC Conversion</h6><xref type="7" name="ascibm"></xref><br></blockquote><h4><a name = "tag_001_014_363">&nbsp;</a>STDIN</h4><blockquote>If no<b>if=</b>operand is specified,the standard input will be used.See the INPUT FILES section.</blockquote><h4><a name = "tag_001_014_364">&nbsp;</a>INPUT FILES</h4><blockquote>The input file can be any file type.</blockquote><h4><a name = "tag_001_014_365">&nbsp;</a>ENVIRONMENT VARIABLES</h4><blockquote>The following environment variables affect the execution of<i>dd</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),the classification ofcharacters as upper- or lower-case, and the mappingof characters from one case to the other.<dt><i>LC_MESSAGES</i><dd>Determine the locale that should be used to affectthe format and contents of diagnosticmessages written to standard errorand informative messages written to standard 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_366">&nbsp;</a>ASYNCHRONOUS EVENTS</h4><blockquote>For SIGINT, the<i>dd</i>utility will write status information to standard error before exiting.It will take the standard action for all other signals;see the ASYNCHRONOUS EVENTS section in<a href="utildes.html">Utility Description Defaults</a><xref href=utildes></xref>.</blockquote><h4><a name = "tag_001_014_367">&nbsp;</a>STDOUT</h4><blockquote>If no<b>of=</b>operand is specified, the standard output will be used.The nature of the output depends on the operands selected.</blockquote><h4><a name = "tag_001_014_368">&nbsp;</a>STDERR</h4><blockquote>On completion,<i>dd</i>will write the number of input and output blocks to standard error.In the POSIX locale the following formats will be used:<p><code><pre><tt>"%u+%u records in\n"</tt>, &lt;<i>number of whole input blocks</i>&gt;,&lt;<i>number of partial input blocks</i>&gt;<tt>"%u+%u records out\n"</tt>, &lt;<i>number of whole output blocks</i>&gt;,&lt;<i>number of partial output blocks</i>&gt;<br></pre></code><p>A partial input block is one for which<i><a href="../xsh/read.html">read()</a></i>returned less than the input block size.A partial output block is one that waswritten with fewer bytes than specified by the output block size.<p>In addition, when there is at least one truncated block, thenumber of truncated blocks will be written to standard error.In the POSIX locale, the format is:<code><p><tt>"%u truncated %s\n"</tt>, &lt;<i>number of truncated blocks</i>&gt;,"record"(if&lt;<i>number of truncated blocks</i>&gt;is one)"records"(otherwise)<br></code><p>Diagnostic messages may also be written to standard error.</blockquote><h4><a name = "tag_001_014_369">&nbsp;</a>OUTPUT FILES</h4><blockquote>If the<b>of=</b>operand is used, the output will be the same as described inthe STDOUT section.</blockquote><h4><a name = "tag_001_014_370">&nbsp;</a>EXTENDED DESCRIPTION</h4><blockquote>None.</blockquote><h4><a name = "tag_001_014_371">&nbsp;</a>EXIT STATUS</h4><blockquote>The following exit values are returned:<dl compact><dt>0<dd>The input file was copied successfully.<dt>&gt;0<dd>An error occurred.</dl></blockquote><h4><a name = "tag_001_014_372">&nbsp;</a>CONSEQUENCES OF ERRORS</h4><blockquote>If an input error is detected and the<b>noerror</b>conversion has notbeen specified, any partial output block will be written to theoutput file, a diagnostic message will be written, and the copyoperation will be discontinued.If some other error isdetected, a diagnostic message will be written and the copyoperation will be discontinued.</blockquote><h4><a name = "tag_001_014_373">&nbsp;</a>APPLICATION USAGE</h4><blockquote>The input and output block size can be specifiedto take advantage of raw physical I/O.<p>There are many different versions of the EBCDIC codesets.The ASCII and EBCDIC conversions specified for the<i>dd</i>utility perform conversions for the version specified by the tables.</blockquote><h4><a name = "tag_001_014_374">&nbsp;</a>EXAMPLES</h4><blockquote>The following command:<pre><code>dd if=/dev/rmt0h  of=/dev/rmt1h</code></pre>copies from tape drive 0 to tape drive 1,using a common historical device naming convention.<p>The following command:<pre><code>dd ibs=10  skip=1</code></pre>strips the first 10 bytes from standard input.<p>This example reads an EBCDICtape blocked ten 80-byte EBCDICcard images per block into the ASCII file<b>x</b> :<pre><code>dd if=/dev/tape of=x ibs=800 cbs=80 conv=ascii,lcase</code></pre></blockquote><h4><a name = "tag_001_014_375">&nbsp;</a>FUTURE DIRECTIONS</h4><blockquote>The IEEE PASC 1003.2 Interpretations Committee has forwarded concerns about parts of this interface definition to the IEEE PASC Shell and Utilities Working Groupwhich is identifying the corrections.A future revision of this specification will align withIEEE Std. 1003.2b when finalised.</blockquote><h4><a name = "tag_001_014_376">&nbsp;</a>SEE ALSO</h4><blockquote><i><a href="sed.html">sed</a></i>,<i><a href="tr.html">tr</a></i>.</blockquote><hr size=2 noshade><center><font size=2>UNIX &reg; is a registered Trademark of The Open Group.<br>Copyright &copy; 1997 The Open Group<br> [ <a href="../index.html">Main Index</a> | <a href="../xshix.html">XSH</a> | <a href="../xcuix.html">XCU</a> | <a href="../xbdix.html">XBD</a> | <a href="../cursesix.html">XCURSES</a> | <a href="../xnsix.html">XNS</a> ]</font></center><hr size=2 noshade></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -