每天开心一点

Linux 的 history 命令使用

2020-09-12 16:45:00    六月    623    来源: https://www.cnblogs.com/ljs05/p/7374707.html

histroy 命令

  1. history 5     #查看历史执行记录后 5 条

  2. !10       #执行历史记录第 10 条命令

  3. !!           #执行上一条命令 或者 !-1 

  4. 用Ctrl+R搜索历史命令

参考: https://www.linuxprobe.com/history-15-cases.html