history command

 

 

! <-- history  expansion character

lamp:/home#echo "!"

-bash: !: event not found

查看之前行過的 cmd

history

執行最後的 542 句 cmd

!542

 

重複執行:

cp import01.file /backup/

^01^02^                          // 把 import01.file 變成 import02.file
       OR
!!:s/01/02

 


 

Clear History

history -c

 


 

Configure

HISTFILESIZE=0
HISTSIZE=0

 

 

Creative Commons license icon Creative Commons license icon