2019-04-21 11:50:48 +08:00

21 lines
1.1 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="dirs">dirs</h1>
<p>显示目录记录</p>
<h2 id="补充说明">补充说明</h2>
<p><strong>dirs命令</strong> 显示当前目录栈中的所有记录不带参数的dirs命令显示当前目录栈中的记录。dirs始终显示当然目录, 再是堆栈中的内容;即使目录堆栈为空, dirs命令仍然只显示当然目录。</p>
<h3 id="语法">语法</h3>
<pre><code class="language-bash">dirs(选项)(参数)</code></pre>
<h3 id="选项">选项</h3>
<pre><code class="language-bash">-c删除目录栈中的所有记录
-l以完整格式显示
-p一个目录一行的方式显示
-v每行一个目录来显示目录栈的内容每个目录前加上的编号
+N显示从左到右的第n个目录数字从0开始
-N显示从右到左的第n个日录数字从0开始
</code></pre>
<h3 id="参数">参数</h3>
<p>目录:显示目录堆叠中的记录。</p>
<h3 id="实例">实例</h3>
<pre><code class="language-bash">[root@localhost etc]# dirs
/etc</code></pre>
<!-- Linux命令行搜索引擎https://jaywcjlove.github.io/linux-command/ -->