[ncolug] Re: Ctrl+R To Search Bash History

  • From: Mike Goracke <mgoracke@xxxxxxxxxx>
  • To: ncolug@xxxxxxxxxxxxx
  • Date: Mon, 10 Oct 2011 01:59:58 -0400

Thank you! I've been wondering how to do this for a long time! Bash does indeed rock!


On 10/09/2011 06:04 PM, Chuck Stickelman wrote:
Bash history is amazing! While many people are familiar with using `!!` (the infamous "Bang-Bang") using something like `!!:s/1/2` (runs the previous command and substitute a "2" for the first occurrence of an "1") can save a lot of time and frustration. Bash rules!

Chuck

On Fri, 2011-10-07 at 22:39 -0400, M. Knisely wrote:
Yep, I'm late coming to this game but I'm hoping others will be blown away as I was. Seems that you can hit Ctrl+R and start typing a command you know you ran once a while back at the command line. As you type it searches through the history locating a match for what you're typing.


I did some google-ing and found lots of other bash history tricks. I strongly suggest looking yourself. It seems that even LifeHacker covered this in 2007, http://lifehacker.com/278888/ctrl%252Br-to-search-and-other-terminal-history-tricks.


Happy researching!


Mike K.

Other related posts: