HowTo: Find Recently Used Commands in Linux

One of my most used commands in Linux is the history command, it lists all your recent commands. The problem with this is you might have to scroll through hundreds before you get to one of any interest, so adding grep to search through these and bring back only relative one’s is great.

Give it a try (just change searchcriteria for what you want like apt-get or tar):

history | grep searchcriteria

Manual pages:


Related posts:

  1. Problems Installing OpenCV in Ubuntu Karmic (9.10)
  2. HowTo: Run .jar files in Ubuntu
  3. HowTo: Install BURG (The Beautiful GRUB Replacement)
This entry was posted in Command Line, HowTo and tagged , , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>