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

📄 files.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>Directory Structure and Devices</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_003">&nbsp;</a>Directory Structure and Devices</h2></center><xref type="1" name="files"></xref><h3><a name = "tag_003_001">&nbsp;</a>Directory Structure and Files</h3>The following directories exist on conforming systems andmust be used as described.Portable applications cannotassume the ability to create files in any of these directories.<dl compact><dt><b>/</b><dd>The root directory.<dt><b>/dev</b><dd>Contains<b>/dev/console</b>,<b>/dev/null</b>and<b>/dev/tty</b>,described below.</dl><p>The following directory exists on conforming systemsand is used as described.<dl compact><dt><b>/tmp</b><dd><index term="/tmp, "></index>A directory made available for programs that need a placeto create temporary files.Applications are allowedto create files in this directory, butcannot assume that such filesare preserved between invocations of the application.The<b>/tmp</b>directory is defined to accommodate historicalapplications that assume its availability.Applications are encouraged to use the contents of<i>TMPDIR</i>for creating temporary files rather thanthe specific name<b>/tmp</b>.See<i><a href="../xsh/tempnam.html">tempnam()</a></i>in the <b>XSH</b> specification.</dl><p>The following files exist on conforming systems and areboth readable and writable.<dl compact><dt><b>/dev/null</b><dd><index term="/dev/null, "></index>An infinite data source and data sink.Data written to<b>/dev/null</b>is discarded.Reads from<b>/dev/null</b>always return end-of-file (EOF).<dt><b>/dev/tty</b><dd><index term="/dev/tty, "></index>In each process, a synonymfor the controlling terminal associated withthe process group of that process, if any.It is useful for programs or shell procedures that wish tobe sure of writing messages to or reading data from the terminalno matter how output has been redirected.It can also be used for programs that demand the name of a filefor output, when typed output is desiredand it is tiresome to find out what terminalis currently in use.</dl><p>The following file exists on conforming systems and need not be readable orwritable:<dl compact><dt><b>/dev/console</b><dd><index term="/dev/console, "></index>The<b>/dev/console</b>file is a generic name given to the system console.  It is usually linked toa particular machine-dependent special file.  It provides a basic I/Ointerface to the system console.</dl><h3><a name = "tag_003_002">&nbsp;</a>Output Devices and Terminal Types</h3><xref type="2" name="termchar"></xref>The utilities in the <b>XCU</b> specification historically have been implementedon a wide range of terminal types, but aconforming implementation need not support all features of allutilities on every conceivable terminal.This specification set states which features are optional for certainclasses of terminals in the individual utility description sections.The implementation will document which terminal typesit supports and which of these features andutilities are not supported by each terminal.<p>When a feature or utility is not supported on a specificterminal type, as allowed by this specification set, and theimplementation considers such a condition to be an errorpreventing use of the feature or utility, the implementationwill indicate such conditions through diagnostic messages orexit status values or both (as appropriate to the specificutility description) that inform the user that the terminaltype lacks the appropriate capability.<p>This specification set uses a notational convention based onhistorical practicethat identifies some of the control characters defined in<xref href=charset><a href="charset.html#tag_001_001">Portable Character Set</a></xref>in a manner easily remembered by users on many terminals.The correspondence between this&quot;control-<i>char</i> &quot;notation and the actual control characters is shown inthe following table.When this specification set refers to a character by itscontrol-name, it is referring to the actual control character shownin the Value column of the table,which is not necessarily the exact control key sequence on all terminals.Some terminals have keyboards that do not allow the direct transmissionof all the non-alphanumeric characters shown.In such cases, the system documentation will describewhich data sequences transmitted by the terminal are interpreted bythe system as representing the special characters.<pre><center><table  bordercolor=#000000 border=1 align=center><tr valign=top><th align=center><b>Name</b><th align=center><b>Value</b><th align=center><b>Name</b><th align=center><b>Value</b><th align=center><b>Name</b><th align=center><b>Value</b><tr valign=top><td align=left><i>control-A</i><td align=center>&lt;SOH&gt;<td align=left>control-L<td align=center>&lt;FF&gt;<td align=left>control-W<td align=center>&lt;ETB&gt;<tr valign=top><td align=left><i>control-B</i><td align=center>&lt;STX&gt;<td align=left>control-M<td align=center>&lt;CR&gt;<td align=left>control-X<td align=center>&lt;CAN&gt;<tr valign=top><td align=left><i>control-C</i><td align=center>&lt;ETX&gt;<td align=left>control-N<td align=center>&lt;SO&gt;<td align=left>control-Y<td align=center>&lt;EM&gt;<tr valign=top><td align=left><i>control-D</i><td align=center>&lt;EOT&gt;<td align=left>control-O<td align=center>&lt;SI&gt;<td align=left>control-Z<td align=center>&lt;SUB&gt;<tr valign=top><td align=left><i>control-E</i><td align=center>&lt;ENQ&gt;<td align=left>control-P<td align=center>&lt;DLE&gt;<td align=left>control-[<td align=center>&lt;ESC&gt;<tr valign=top><td align=left><i>control-F</i><td align=center>&lt;ACK&gt;<td align=left>control-Q<td align=center>&lt;DC1&gt;<td align=left>control-\<td align=center>&lt;FS&gt;<tr valign=top><td align=left><i>control-G</i><td align=center>&lt;BEL&gt;<td align=left>control-R<td align=center>&lt;DC2&gt;<td align=left>control-]<td align=center>&lt;GS&gt;<tr valign=top><td align=left><i>control-H</i><td align=center>&lt;BS&gt;<td align=left>control-S<td align=center>&lt;DC3&gt;<td align=left>control-^<td align=center>&lt;RS&gt;<tr valign=top><td align=left><i>control-I</i><td align=center>&lt;HT&gt;<td align=left>control-T<td align=center>&lt;DC4&gt;<td align=left>control-_<td align=center>&lt;US&gt;<tr valign=top><td align=left><i>control-J</i><td align=center>&lt;LF&gt;<td align=left>control-U<td align=center>&lt;NAK&gt;<td align=left>control-?<td align=center>&lt;DEL&gt;<tr valign=top><td align=left><i>control-K</i><td align=center>&lt;VT&gt;<td align=left>control-V<td align=center>&lt;SYN&gt;</table></center></pre><h6 align=center><xref table="Control Character Names"><a name="tagt_3">&nbsp;</a></xref>Table: Control Character Names</h6><xref type="7" name="cntlcharnames"></xref><dl><dt><b>Note:</b><dd>The notation uses upper-case letters for arbitrary editorial reasons.There is no implication that the keystrokes represent control-shift-lettersequences.</dl></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 + -