搜索历史命令 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