One of the things that drives me mad is typing long commands or sequences that I need to type over and over again.
Luckily there is a way to search your previous commands in bash.
Simply type CTRL R and you will get a new command prompt. Then start typing part of the command.
To keep looking back through other instances of the command just keep hitting CTRL R.
Once you’ve found the line you want a simple “arrow up” or similar will get you back to your normal command prompt.
Paul Browne - Technology and People says
Uber Techie , but very useful. It also works on Cygwin (Linux Console for Windows).
Been wondering how to do this for a while now …
Paul
Michele Neylon says
Paul
I use that command all the time 🙂
All my personal domains are hosted on servers without any control interfaces apart from SSH. I used to rely on grepping .bash_history until someone showed me this really cool solution 🙂
Michele