历史记录
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
[root@clf ~]# history 1 ip a 2 ip a 3 logout 4 exit 5 man ls [root@clf ~]# history | grep ip 1 ip a 2 ip a 选项: [root@clf ~]# history -d 2 #删除历史ID为2的命令 [root@clf- ~]# history -w #将当前的历史记录写入到默认的文件中 ~/.bash_history [root@clf ~]# history -c #清空历史记录 [root@qls ~]# history 1 history !4 #执行历史ID为4的指令 |