搜索歷史命令 Ctrl + R ( ctrl + r to search the history command )


 

Linux下的神器 ctrl + r (reverse-i-search ) 的使用方法:   (reverse-i-search usage: ) 

(press ctl + r ) 輸入任意字符,例如: "mig"  就會出現 $  rake db:migrate    ( press ctrl + r, then input the content you want to search) 

如果我想找另一個命令呢?  輸入完 'mig' 多按幾次 ctrl + r ,就可以繼續向前搜索 “mig" 的內容了。  ( if you want to search the last but n result, just press n times 'ctrl + r'.)

如果找到了,按 -> 或者直接回車,就是執行  ( press Enter to execute the command , or 'right arrow (->)' to go to the end of the command. 

更多請看 (refer to ):www.thegeekstuff.com/tag/bash-control-r/   


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM