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. Howto: Use Xbox Controllers (original, 360, 360 wireless, 360 guitar) with Linux
  2. HowTo Fix: “There is a problem with your sound card. Spotify can’t play music.” (Wine)
  3. HowTo: Run .jar files in Ubuntu
  4. HowTo: Install OpenCV in Ubuntu Karmic (9.10)
  5. Howto: Reinstall Grub using Ubuntu Live CD

Leave a Reply

  

  

  

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>