命令 history
上一篇 /
下一篇 2015-04-17 15:39:46
/ 个人分类:Linux
history 还用history可以查看我们曾经执行过的命令,如果觉得history输入起来太麻烦,记得使用别名哦。 alias h='history'
- history [n]
- history [-c]
- history [-row] histfiles
- 利用history功能帮助执行命令
- !number
- !command
- !!
- eg: [root&Hogan 04:34:48 /home #54]# history 5
231 history -w
232 echo $HISTSIZE
233 dir
234 history 10
235 history 5
[root&Hogan 04:34:57 /home #55]# !232
echo $HISTSIZE
1000
[root&Hogan 04:35:12 /home #56]# !!
echo $HISTSIZE
1000
[root&Hogan 04:35:18 /home #57]# !his //执行最近以his开头的命令
history 5
233 dir
234 history 10
235 history 5
236 echo $HISTSIZE
237 history 5
收藏
举报
TAG:
history