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

📄 df.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>df</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><h4><a name = "tag_001_014_396">&nbsp;</a>NAME</h4><blockquote>df - report free disk space</blockquote><h4><a name = "tag_001_014_397">&nbsp;</a>SYNOPSIS</h4><blockquote><pre><code>df <b>[</b>-k<b>][ </b>-P|-t<b>][</b><i>file</i>...<b>]</b></code></pre></blockquote><h4><a name = "tag_001_014_398">&nbsp;</a>DESCRIPTION</h4><blockquote>The<i>df</i>utility writes the amount of available spaceand file slotsfor file systems on which the invoking user has appropriate read access.File systems are specified by the<i>file</i>operands; when none are specified, information is writtenfor all file systems.The format of the default output from<i>df</i>is unspecified,but all space figures will be reported in 512-byte units, unless the<b>-k</b>option is specified.This output contains at least the file system names,amount of available space on each of these file systems,and the number of free file slots, or<i>inodes</i>,available;when<b>-t</b>is specified, the output contains the total allocated space as well.</blockquote><h4><a name = "tag_001_014_399">&nbsp;</a>OPTIONS</h4><blockquote>The<i>df</i>utility supports the <b>XBD</b> specification, <a href="../xbd/utilconv.html#usg"><b>Utility Syntax Guidelines</b>&nbsp;</a> .<p>The following options are supported:<dl compact><dt><b>-k</b><dd>Use 1024-byte units, instead of the default 512-byte units,when writing space figures.<dt><b>-P</b><dd>Produce output in the format described in the STDOUT section.<dt><b>-t</b><dd>Include total allocated-space figures in the output.</dl></blockquote><h4><a name = "tag_001_014_400">&nbsp;</a>OPERANDS</h4><blockquote>The following operand is supported:<dl compact><dt><i>file</i><dd>A pathname of a file within the hierarchy ofthe desired file system.If a file other than a FIFO, a regular file, a directoryor a special file representing the devicecontaining the file system(for example,<b>/dev/dsk/0s1</b>)is specified, the results are unspecified.Otherwise,<i>df</i>will write the amount of free space in the file systemcontaining the specified<i>file</i>operand.</dl></blockquote><h4><a name = "tag_001_014_401">&nbsp;</a>STDIN</h4><blockquote>Not used.</blockquote><h4><a name = "tag_001_014_402">&nbsp;</a>INPUT FILES</h4><blockquote>None.</blockquote><h4><a name = "tag_001_014_403">&nbsp;</a>ENVIRONMENT VARIABLES</h4><blockquote>The following environment variables affect the execution of<i>df</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).<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_404">&nbsp;</a>ASYNCHRONOUS EVENTS</h4><blockquote>Default.</blockquote><h4><a name = "tag_001_014_405">&nbsp;</a>STDOUT</h4><blockquote>When both the<b>-k</b>and<b>-P</b>options are specified,the following header line will be written (in the POSIX locale):<pre><code>"Filesystem 1024-blocks Used Available Capacity Mounted on\n"</code></pre><p>When the<b>-P</b>option is specified without the<b>-k</b>option,the following header line will be written (in the POSIX locale):<pre><code>"Filesystem 512-blocks Used Available Capacity Mounted on\n"</code></pre><p>The implementation may adjust the spacing of the header lineand the individual data lines so that the information ispresented in orderly columns.<p>The remaining output with<b>-P</b>will consist of one lineof information for each specified file system.These lines are formatted as follows:<pre><code>"%s %d %d %d %d%% %s\n", &lt;<i>file&nbsp;system&nbsp;name</i>&gt;, &lt;<i>total&nbsp;space</i>&gt;,&lt;<i>space&nbsp;used</i>&gt;, &lt;<i>space&nbsp;free</i>&gt;, &lt;<i>percentage&nbsp;used</i>&gt;, &lt;<i>file&nbsp;system&nbsp;root</i>&gt;</code></pre><p>In the following list,all quantities expressed in 512-byte units(1024-byte when<b>-k</b>is specified) will berounded up to the next higher unit.The fields are:<dl compact><dt>&lt;<i>file&nbsp;system&nbsp;name</i>&gt;<dd>The name of the file system, in an implementation-dependent format.<dt>&lt;<i>total&nbsp;space</i>&gt;<dd>The total size of the file system in 512-byte units.The exactmeaning of this figure is implementation-dependent, but shouldinclude&lt;<i>space&nbsp;used</i>&gt;,&lt;<i>space&nbsp;free</i>&gt;,plus any space reserved by the system not normallyavailable to a user.<dt>&lt;<i>space&nbsp;used</i>&gt;<dd>The total amount of space allocated toexisting files in the file system, in 512-byte units.<dt>&lt;<i>space&nbsp;free</i>&gt;<dd>The total amount of space available within the file systemfor the creation of new files by unprivileged users, in512-byte units.When this figure is less than or equal to zero, itis not possible to create any new files on the filesystem without first deleting others, unless the process hasappropriate privileges.The figure written may be less than zero.<dt>&lt;<i>percentage&nbsp;used</i>&gt;<dd>The percentage of the normally available space that iscurrently allocated to all files on the file system.This is calculated using the fraction:<pre><code>space used&lt;<i>/(.xcm</i>&gt;space used</code></pre>expressed as a percentage.This percentage may be greater than 100 if&lt;<i>space free</i>&gt;is less than zero.The percentage value is expressed as a positive integer,with any fractional result causing it to be rounded to the nexthighest integer.<dt>&lt;<i>file&nbsp;system&nbsp;root</i>&gt;<dd>The directory below which the file system hierarchy appears.</dl><p>The output format is unspecified when<b>-t</b>is used.</blockquote><h4><a name = "tag_001_014_406">&nbsp;</a>STDERR</h4><blockquote>Used only for diagnostic messages.</blockquote><h4><a name = "tag_001_014_407">&nbsp;</a>OUTPUT FILES</h4><blockquote>None.</blockquote><h4><a name = "tag_001_014_408">&nbsp;</a>EXTENDED DESCRIPTION</h4><blockquote>None.</blockquote><h4><a name = "tag_001_014_409">&nbsp;</a>EXIT STATUS</h4><blockquote>The following exit values are returned:<dl compact><dt>0<dd>Successful completion.<dt>&gt;0<dd>An error occurred.</dl></blockquote><h4><a name = "tag_001_014_410">&nbsp;</a>CONSEQUENCES OF ERRORS</h4><blockquote>Default.</blockquote><h4><a name = "tag_001_014_411">&nbsp;</a>APPLICATION USAGE</h4><blockquote>On most systems,the &quot;name of the file system, in an implementation-dependent format&quot;will be the special file on which the file system is mounted.<p>On large file systems, the calculation specified for percentage usedcan create huge rounding errors.</blockquote><h4><a name = "tag_001_014_412">&nbsp;</a>EXAMPLES</h4><blockquote><ol><p><li>The following example writes portable informationabout the<b>/usr</b>file system:<pre><code>df -P /usr</code></pre><p><li>Assuming that<b>/usr/src</b>is part of the<b>/usr</b>file system, the following will do the same as the previous example:<pre><code>df -P /usr/src</code></pre><p></ol></blockquote><h4><a name = "tag_001_014_413">&nbsp;</a>FUTURE DIRECTIONS</h4><blockquote>None.</blockquote><h4><a name = "tag_001_014_414">&nbsp;</a>SEE ALSO</h4><blockquote><i><a href="find.html">find</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 + -