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

16 lines
1.2 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="updatedb">updatedb</h1>
<p>创建或更新slocate命令所必需的数据库文件</p>
<h2 id="补充说明">补充说明</h2>
<p><strong>updatedb命令</strong> 用来创建或更新slocate命令所必需的数据库文件。updatedb命令的执行过程较长因为在执行时它会遍历整个系统的目录树并将所有的文件信息写入slocate数据库文件中。</p>
<p>补充说明slocate本身具有一个数据库里面存放了系统中文件与目录的相关信息。</p>
<h3 id="语法">语法</h3>
<pre><code class="language-bash">updatedb(选项)</code></pre>
<h3 id="选项">选项</h3>
<pre><code class="language-bash">-o&lt;文件&gt;忽略默认的数据库文件使用指定的slocate数据库文件
-U&lt;目录&gt;更新指定目录的slocate数据库
-v显示执行的详细过程。</code></pre>
<h3 id="实例">实例</h3>
<p>实用updatedb命令的<code>-U</code>选项可以指定要更新slocate数据库的目录。</p>
<pre><code class="language-bash">updatedb -U /usr/local/ 更新指定命令的slocate数据库</code></pre>
<!-- Linux命令行搜索引擎https://jaywcjlove.github.io/linux-command/ -->