home products tech support contact us

 Linux 技術支援    ⇒   基礎篇    進階篇    補腦篇    指令索引    中⇒ENG
版權所有, 引用請註明出處
 

history 指令回顧

想知道曾經下過的指令可查看 echo $HISTFILE 所回報的檔案,而指令 history 就是讀取該檔來列出曾下過的指令。

一些常見的 history 選項包括:

例:
$ history ←查詢曾下過的指令
    11 mv pro1 pro2
    12 cp /dev/null file.txt
    13 vi file.txt
$ !12 ←執行編號 12 的指令

其他詳細的選項參數可參考連結