| 您的当前位置:首页 --> CentOS入门 |
| CentOS系统里的历史命令:history |
| 浏览次数:2429 关键词 ( 命令 历史 系统 CentOS ) |
|
[root@linux ~]# history [n] [root@linux ~]# history [-c] [root@linux ~]# history [-raw] histfiles 参数: n :数字,意思是『要列出最近的 n 笔命令列表』的意思! -c :将目前的 shell 中的所有 history 内容全部消除 -a :将目前新增的 history 指令新增入 histfiles 中,若没有加 histfiles , 则预设写入 ~/.bash_history -r :将 histfiles 的内容读到目前这个 shell 的 history 记忆中; -w :将目前的 history 记忆内容写入 histfiles 中! 范例: 范例一:列出目前内存内的所有 history 记忆 [root@linux ~]# history # 前面省略 1017 man bash 1018 ll 1019 history 1020 history # 列出的信息当中,共分两栏,第一栏为该指令在这个 shell 当中的代码, # 另一个则是指令本身的内容喔!至于会秀出几笔指令记录,则与 HISTSIZE 有关! 范例二:列出目前最近的 3 笔资料 [root@linux ~]# history 3 1019 history 1020 history 1021 history 3 范例三:立刻将目前的资料写入 histfile 当中 [root@linux ~]# history -w # 在预设的情况下,会将历史纪录写入 ~/.bash_history 当中! [root@linux ~]# echo $HISTSIZE 1000 |
| 下载次数:6 |
| 下载地址:点击下载 |
| 本资源为程序自动采集,如有侵权请联系我们移除 admin#80vps.com 来信请将#替换为@ |
| 下一条 centos系统中网络配置相关 上一条 CentOS系统里的档案的搜寻命令:which |