uTools-Manuals/docs/linux/quotacheck.html
2019-04-21 11:50:48 +08:00

25 lines
1.6 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<h1 id="quotacheck">quotacheck</h1>
<p>检查磁盘的使用空间与限制</p>
<h2 id="补充说明">补充说明</h2>
<p><strong>quotacheck命令</strong> 通过扫描指定的文件系统获取磁盘的使用情况创建、检查和修复磁盘配额quota文件。执行quotacheck指令扫描挂入系统的分区并在各分区的文件系统根目录下产生quota.user和quota.group文件设置用户和群组的磁盘空间限制。</p>
<h3 id="语法">语法</h3>
<pre><code class="language-bash">quotacheck(选项)(参数)</code></pre>
<h3 id="选项">选项</h3>
<pre><code class="language-bash">-a扫描在/etc/fstab文件里有加入quota设置的分区
-d详细显示指令执行过程便于排错或了解程序执行的情形
-g扫描磁盘空间时计算每个群组识别码所占用的目录和文件数目
-R排除根目录所在的分区
-u扫描磁盘空间时计算每个用户识别码所占用的目录和文件数目
-v显示指令执行过程。</code></pre>
<h3 id="参数">参数</h3>
<p>文件系统:指定要扫描的文件系统。</p>
<h3 id="实例">实例</h3>
<p>将所有的在<code>/etc/mtab</code>含有quota支持的partition进行扫描</p>
<pre><code class="language-bash">[root@linux ~]# quotacheck -avug
quotacheck: Scanning /dev/hdb1 [/disk2] done
quotacheck: Checked 3 directories and 4 files
</code></pre>
<p>强制扫描已挂载的filesystem</p>
<pre><code class="language-bash">[root@linux ~]# quotacheck -avug -m</code></pre>
<!-- Linux命令行搜索引擎https://jaywcjlove.github.io/linux-command/ -->