Know your history (at least in bash)

I always wonder why do you see so many people pressing up a bazillion times when trying to bring a command they recently typed. Just use ctrl+r and type part of the previous command, it’ll save you many hours of pressing up.


2 Comments on “Know your history (at least in bash)”

  1. Ridgeland says:

    in .bashrc I have an alias:
    alias his=’history | grep ‘
    So I use
    $ his ssh
    to see all the ssh command I’ve entered.
    It’s a shorter list than history and more than [Ctrl]+r
    Then !1234 to run a command again.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s