Ctrl+R 是我经常使用的一个快捷键。
此快捷键让你对命令历史进行搜索,对于想要重复执行某个命令的时候非常有用。当找到命令后,通常再按回车键就可以执行该命令。
如果想对找到的命令进行调整后再执行,则可以按一下左或右方向键。[code]# [Press Ctrl+R from the command prompt, which will display the reverse-i-search prompt]
(reverse-i-search)`red‘: cat /etc/redhat-release
[Note: Press enter when you see your command, which will execute the command from the history]
cat /etc/redhat-release
Fedora release 9 (Sulphur)[/code]