查看和执行历史命令
查看 history
[root@centos ~]# history
1 ls
2 cd
3 cd /
4 ls
5 cd tmp/
重复执行历史命令
上一次历史命令
- 向上方向键
- 输入!!(英文感叹号)
- 输入!-1(无空格)
- Ctrl+P
叹号定位法
不适用,不可能去.bash_history中专门查看
搜索定位法
Ctrl+R
多次Ctrl+R可在切换结果
回车执行
http://c.biancheng.net/linux/history.html
查看和执行历史命令
查看 history
[root@centos ~]# history
1 ls
2 cd
3 cd /
4 ls
5 cd tmp/
重复执行历史命令
上一次历史命令
叹号定位法
不适用,不可能去.bash_history中专门查看
搜索定位法
Ctrl+R
多次Ctrl+R可在切换结果
回车执行
http://c.biancheng.net/linux/history.html
让时间为你证明