history

history命令:

history 3,顯示最近使用的3條命令

[root@WebB-137 nginx-1.14.2]# history 3
  396  history -d 395
  397  history 10
  398  history 3
[root@WebB-137 nginx-1.14.2]#

使用397這條命令

[root@WebB-137 nginx-1.14.2]# !397
history 10
  390  history -d 389
  391  history
  392  history 5
  393  history -d 392
  394  history
  395  history 10
  396  history -d 395
  397  history 10
  398  history 3
  399  history 10

其他選項:

history -d 指定偏移量 刪除歷史命令

history -c 刪除所有歷史命令記錄


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章