语法高亮,滚动条美化,设置页面调整

This commit is contained in:
fofolee
2019-04-19 02:41:09 +08:00
parent 1e8f76c000
commit 359d29ee0b
1590 changed files with 12328 additions and 11441 deletions

View File

@@ -5,9 +5,9 @@
<p>该命令单独使用时,仅显示历史命令,在命令行中,可以使用符号<code>!</code>执行指定序号的历史命令。例如要执行第2个历史命令则输入<code>!2</code></p>
<p>历史命令是被保存在内存中的当退出或者登录shell时会自动保存或读取。在内存中历史命令仅能够存储1000条历史命令该数量是由环境变量<code>HISTSIZE</code>进行控制。</p>
<h3 id="语法">语法</h3>
<pre><code>history(选项)(参数)</code></pre>
<pre><code class="language-bash">history(选项)(参数)</code></pre>
<h3 id="选项">选项</h3>
<pre><code>-c清空当前历史命令
<pre><code class="language-bash">-c清空当前历史命令
-a将历史命令缓冲区中命令写入历史命令文件中
-r将历史命令文件中的命令读入当前历史命令缓冲区
-w将当前历史命令缓冲区命令写入历史命令文件中。</code></pre>
@@ -15,7 +15,7 @@
<p>n打印最近的n条历史命令。</p>
<h3 id="实例">实例</h3>
<p>使用history命令显示最近使用的10条历史命令输入如下命令</p>
<pre><code>[root@localhost ~]# history 10
<pre><code class="language-bash">[root@localhost ~]# history 10
92 ls
93 cd ..
94 ls
@@ -27,14 +27,14 @@
100 exit
101 history 10</code></pre>
<p>列出最近3条记录</p>
<pre><code>[root@localhost ~]# history 3
<pre><code class="language-bash">[root@localhost ~]# history 3
15 2017-08-26 11:44:35 root history 3
16 2017-08-26 11:44:37 root history n
17 2017-08-26 11:44:40 root history 3</code></pre>
<p>清空历史记录</p>
<pre><code>[root@localhost ~]# history -c</code></pre>
<pre><code class="language-bash">[root@localhost ~]# history -c</code></pre>
<p>更多实例:</p>
<pre><code>history -cw
<pre><code class="language-bash">history -cw
`~/.bash_history`: 保存历史命令
`/etc/profile` -&gt; HISSIZE: 历史命令保存数量
推荐添加 h -&gt; history, hsi -&gt; history|grep 别名