syntax highlight

Thursday 28 April 2011

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:

  1. 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.

    ReplyDelete