1. 程式人生 > >Linux檢視之前的操作命令

Linux檢視之前的操作命令

用history命令就行,具體格式:
[[email protected] ~]# history [n]
[[email protected] ~]# history [-c]
[[email protected] ~]# history [-raw] histfiles
引數:
n :數字,意思是‘要列出最近的 n 筆命令列表’的意思!
-c :將目前的 shell 中的所有 history 內容全部消除
-a :將目前新增的 history 指令新增入 histfiles 中,若沒有加 histfiles ,
則預設寫入 ~/.bash_history
-r :將 histfiles 的內容讀到目前這個 shell 的 history 記憶中;
-w :將目前的 history 記憶內容寫入 histfiles 中!

 

history

man history