Back

Linux 控制台神器:搜索历史命令 Ctrl + R ( ctrl + r to search the history command )

发布时间: 2013-01-29 07:30:00

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/   

Back