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

📄 intro.html

📁 unix 下的C开发手册,还用详细的例程。
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><!-- Copyright 1997 The Open Group, All Rights Reserved --><title>ls</title></head><body bgcolor=white><center><font size=2>The Single UNIX &reg; Specification, Version 2<br>Copyright &copy; 1997 The Open Group</font></center><hr size=2 noshade><blockquote><center><h2><a name = "tag_001">&nbsp;</a>Introduction</h2></center><xref type="1" name="intro"></xref><h3><a name = "tag_001_001">&nbsp;</a>Overview</h3>The XCU specification defines the shell command languageand the utilities provided by the X/Open System Interface (XSI).The utilities are accessed using commandsgiven to command interpreters supportingthe shell command language.The system interfaces and headers (described in CAE Specification, <b>System Interfaces and Headers</b>, <b>Issue 5</b>) and the utilitiesare jointly known as services to application programs.No particular restrictions are imposed on the way inwhich the services are implemented.<p>The utilities are defined in terms of their interface as seenfrom the<i>sh</i>command interpreter.Alternative interfaces are available to application programs throughone of thefunctions, and the<i><a href="../xsh/popen.html">popen()</a></i>and<i><a href="../xsh/system.html">system()</a></i>interfaces, all of which are described in CAE Specification, <b>System Interfaces and Headers</b>, <b>Issue 5</b>.<h3><a name = "tag_001_002">&nbsp;</a>Conformance</h3><xref type="2" name="conformance"></xref>An implementation conforming to this specification shallmeet the following criteria:<ul><p><li>The system shall provide all the utilities described in this specificationwith all the functionality defined, subject to the following:<ul><p><li>Development utilities listed in<xref href=dev><a href="#tag_001_003_001">Development</a></xref>need not be provided.<p><li>FORTRAN utilities listed in<xref href=fortran><a href="#tag_001_003_002">FORTRAN</a></xref>need not be provided.<p><li>Legacy utilities listed in<xref href=legacy><a href="#tag_001_003_003">LEGACY</a></xref>need not be provided.<p><li>Within the utilities that are provided, functionality marked by the codes<small>OF</small>, <small>OP</small>, <small>PI</small>, or <small>UN</small>need not be provided.<p></ul><p><li>The system may provide one or more of the following:<ul><p><li>development utilities (as a group) listed in<xref href=dev><a href="#tag_001_003_001">Development</a></xref><p><li>the FORTRAN77 compiler listed in<xref href=fortran><a href="#tag_001_003_002">FORTRAN</a></xref>.<p></ul><p>When an implementation claims that an optional or possibly unsupportablefacility is provided, all of its constituent parts shall be providedand shall comply with the specification.<p>When an implementation claims that a development system is provided,all of the utilities marked <b>DEVELOPMENT</b> and listed in<xref href=dev><a href="#tag_001_003_001">Development</a></xref>,except<i><a href="dis.html">dis</a></i>,shall be provided and shall comply with the specification.<p>When an implementation claims that a FORTRAN system is provided,the utility marked <b>FORTRAN</b> and listed in<xref href=fortran><a href="#tag_001_003_002">FORTRAN</a></xref>shall be provided and shall comply with the specification.<dl><dt><b>Note:</b><dd>To determine whether an implementation supports development, FORTRANor possibly unsupportable utilities, refer to the implementation'sConformance Statement.</dl><p><li>The system may provide additional or enhanced utilities and facilitiesnot required by this specification, provided that such additions orenhancements do not affect the behaviour of an applicationthat requires only the facilities described in this specification.<p></ul><p>An implementation conforming to this specification depends on the environmentprovided by the system interfaces and headers specified in the referenced<b>XSH</b> specification.  For further information, refer to the <b>XSH</b> specification, <b>Section 1.2</b>,<b>Conformance</b>, the referenced <b>XPG4, Version 2</b> document andthe implementation's Conformance Statement.<h4><a name = "tag_001_002_001">&nbsp;</a>Symbolic Links</h4>The definition of symbolic links in the <b>XBD</b> specification, <a href="../xbd/glossary.html"><b>Glossary</b>&nbsp;</a>  was new inIssue 4, Version 2.An implementation need not support symbolic links to be conformant with thisdocument.  (See the <b>XSH</b> specification, <b>Section 1.2, Conformance</b> for the implicationson conformance with the <b>XSH</b> specification.)<p>The definition of pathname resolution in the <b>XBD</b> specification, <a href="../xbd/glossary.html"><b>Glossary</b>&nbsp;</a>  indicates the effects ofsymbolic links.  However, many utilities that manipulate files may manipulatesymbolic links.  Use of these utilities in this context (that is, when thelast component of the pathname is a symbolic link) produces unspecifiedeffects.  In addition, if any utility encounters a symbolic link afterpathname resolution has been completed, the effects are unspecified.<p><h4><a name = "tag_001_002_002">&nbsp;</a>Considerations for Utilities in Support of Files of Arbitrary Size</h4>The following utilities will support files of any size up to themaximum that can be created by the implementation.  This supportincludes correct writing of file size-related values (such as filesizes and offsets, line numbers, and block counts) and correctinterpretation of command line arguments that contain such values. <dl compact><dt><i>basename</i><dd>Return non-directory portion of pathname.<dt><i>cat</i><dd>Concatenate and print files.<dt><i>cd</i><dd>Change working directory.<dt><i>chgrp</i><dd>Change file group ownership.<dt><i>chmod</i><dd>Change file modes.<dt><i>chown</i><dd>Change file ownership.<dt><i>cksum</i><dd>Write file checksums and sizes.<dt><i>cmp</i><dd>Compare two files.<dt><i>cp</i><dd>Copy files.<dt><i>dd</i><dd>Convert and copy a file.<dt><i>df</i><dd>Report free disk space.<dt><i>dirname</i><dd>Return directory portion of pathname.<dt><i>du</i><dd>Estimate file space usage.<dt><i>find</i><dd>Find files.<dt><i>ln</i><dd>Link files.<dt><i>ls</i><dd>List directory contents.<dt><i>mkdir</i><dd>Make directories.<dt><i>mv</i><dd>Move files.<dt><i>pathchk</i><dd>Check pathnames.<dt><i>pwd</i><dd>Return working directory name.<dt><i>rm</i><dd>Remove directory entries.<dt><i>rmdir</i><dd>Remove directories.<dt><i>sh</i><dd>Shell, the standard command language interpreter.<dt><i>sum</i><dd>Print checksum and block or byte count of a file.<dt><i>test</i><dd>Evaluate expression.<dt><i>touch</i><dd>Change file access and modification times.<dt><i>ulimit</i><dd>Set or report file size limit.</dl><p>Exceptions to the requirement that utilities support files of any sizeup to the maximum are: <ol><p><li>Utilities such as <i><a href="tar.html">tar</a></i>and <i><a href="cpio.html">cpio</a></i>cannot support arbitrary file sizesdue to limitations imposed by fixed file formats. <p><li>Uses of files ascommand scripts, or for configuration or control, are exempt. Forexample, it is not required that <i><a href="sh.html">sh</a></i>be able to read an arbitrarily large &quot;.profile&quot;. <p><li>Shell input and output redirection are exempt. Forexample, it is not required that the redirections<i>sum &lt; file</i>or<i>echo foo &gt; file</i>succeed for an arbitrarily large existing file. <p></ol><h3><a name = "tag_001_003">&nbsp;</a>Options</h3><p>Utilities marked <b>DEVELOPMENT</b>, <b>FORTRAN</b> or <b>LEGACY</b> are optional.See<xref href=conformance><a href="#tag_001_002">Conformance</a></xref>for conformance requirements.<h4><a name = "tag_001_003_001">&nbsp;</a>Development</h4><xref type="3" name="dev"></xref>Utilities marked <b>DEVELOPMENT</b> in this specification are:<pre><center><table  bordercolor=#000000 border=1 align=center><tr valign=top><th colspan=4 align=center><b>Development Utilities</b><tr valign=top><td align=left>admin<td align=left>get<td align=left>nm<td align=left>strip<tr valign=top><td align=left>cflow<td align=left>lex<td align=left>prs<td align=left>unget<tr valign=top><td align=left>ctags<td align=left>lint<td align=left>rmdel<td align=left>val<tr valign=top><td align=left>cxref<td align=left>m4<td align=left>sact<td align=left>what<tr valign=top><td align=left>delta<td align=left>make<td align=left>sccs<td align=left>yacc<tr valign=top><td align=left>dis<td align=left>&nbsp;<td align=left>&nbsp;<td align=left>&nbsp;</table></center></pre>Even if the DEVELOPMENT option is supported, or the LEGACY option issupported, the<i>dis</i>utility need not be supported.<h4><a name = "tag_001_003_002">&nbsp;</a>FORTRAN</h4><xref type="3" name="fortran"></xref>The<i><a href="fort77.html">fort77</a></i>FORTRAN compiler is the only utility marked <b>FORTRAN</b> in thisspecification.<h4><a name = "tag_001_003_003">&nbsp;</a>LEGACY</h4><xref type="3" name="legacy"></xref>The utilities in the table below are marked <b>LEGACY</b>.Various factors may have contributed to the decision to class autility <b>LEGACY</b>.Application writers should not use functionality marked <b>LEGACY</b>.<p>If a migration path exists, advice is given to application developersregarding alternative means of obtaining similar functionality.This information may be found in the APPLICATION USAGEsections on the relevant pages.<p>No requirement beyond that which was in effect at the timethat these utilities were marked <b>LEGACY</b> shall be applied tothese utilities.<pre><center><table  bordercolor=#000000 border=1 align=center><tr valign=top><th colspan=4 align=center><b>Legacy Utilities</b><tr valign=top><td align=left> <a href="calendar.html">calendar</a> <a href="cancel.html">cancel</a> <a href="cc.html">cc</a> <a href="col.html">col</a> <a href="cpio.html">cpio</a> <a href="cu.html">cu</a> <a href="dircmp.html">dircmp</a> <td align=left> <a href="dis.html">dis</a> <a href="egrep.html">egrep</a> <a href="fgrep.html">fgrep</a> <a href="line.html">line</a> <a href="lint.html">lint</a> <a href="lpstat.html">lpstat</a> <td align=left> <a href="mail.html">mail</a> <a href="pack.html">pack</a> <a href="pcat.html">pcat</a> <a href="pg.html">pg</a> <a href="spell.html">spell</a> <a href="sum.html">sum</a> <a href="tar.html">tar</a> <td align=left> <a href="unpack.html">unpack</a> <a href="uulog.html">uulog</a> <a href="uuname.html">uuname</a> <a href="uupick.html">uupick</a> <a href="uuto.html">uuto</a> </table></center></pre></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 + -