This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[root@localhost ~]# history | |
#前面省略 | |
201 LANG=C | |
212 ifup eno33554992 | |
215 history 10 | |
214 vi ~/.bash_history | |
215 history | |
216 vi ~/.bashrc | |
217 hostname | |
218 ip a | |
219 ip route | |
220 nmcli c s | |
#顯示歷史指令 | |
#參數介紹 | |
-c 刪除紀錄 | |
-a 新增 | |
-w 寫入 histfiles | |
#資料庫位置 | |
~/.bash_history |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[root@localhost ~]# history 3 | |
218 ip a | |
219 ip route | |
220 nmcli c s | |
#只列出最近的3筆資料 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[root@localhost ~]# ![number] | |
#執行[history 序號] | |
[root@localhost ~]# !! | |
#執行上一個指令 | |
[root@localhost ~]# !219 | |
ip route | |
default via 192.168.1.1 dev eno33554992 | |
169.254.0.0/16 dev eno16777736 scope link metric 1002 | |
169.254.0.0/16 dev eno33554992 scope link metric 1003 | |
192.168.1.0/24 dev eno33554992 proto kernel scope link src 192.168.1.108 | |
192.168.2.0/24 dev eno16777736 proto kernel scope link src 192.168.2.131 | |
#[219]為 ip route |
沒有留言:
張貼留言