21篇测试必备的Linux常用命令,每天敲一篇,每次敲三遍,每月一循环,全都可记住!!

https://www.cnblogs.com/poloyy/category/1672457.html

 

查看历史命令执行记录 

history 

 

查看命令mkdir 的历史执行记录 

history | grep mkdir 

 

执行历史记录中,序号为1015的命令 

!1015

Linux常用命令 - history命令详解

 

执行上一条命令(直接输入两个感叹号)

!!

 

查找最后10条历史记录(两种方式)

history 10
history | tail -10

 

清除历史记录

history -c

 

将当前所有历史记录写入历史文件中,默认写入 ~/.bash_history 

history -w
cat ~/.bash_history

 

相关文章:

  • 2021-10-10
  • 2022-02-04
  • 2021-07-20
  • 2021-08-05
  • 2021-09-15
  • 2021-11-12
  • 2021-12-10
  • 2021-11-04
猜你喜欢
  • 2022-02-07
  • 2021-09-19
  • 2021-12-30
  • 2021-12-23
  • 2021-10-06
相关资源
相似解决方案