[aklug] Tip Jar: Search through bash history

From: Mike <alaskabarsalou@gmail.com>
Date: Sun Feb 01 2015 - 12:51:53 AKST

For the longest time when using bash, I've used the up arrow key to
get to previous commands. This had gotten tiring, so I searched out a
way to find a previous command without having to hit up arrow so many
times.

I found this article:
http://ruslanspivak.com/2010/11/20/bash-history-reverse-intelligent-search/

The basic idea is you can press CTRL-R and then start typing the
command you are looking for.

For example, if it was a git command, you can type:

CTRL-R git

Then it will look backwards through your history to find the most
recent git command.

If you hit CTRL-R during that, it will find the one before that.

Give it a try!! It is really nice way to go back in time!

Also, if things seem a little wonky, you can hit CTRL-G and you will
be back to normal.

Mike B.
---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.
Received on Sun Feb 1 12:52:28 2015

This archive was generated by hypermail 2.1.8 : Sun Feb 01 2015 - 12:52:29 AKST