Blog Archives

How to get the top 10 recently used commands

The file .bash_history in a users home-directory saves the recently used commands. You can modify the maximum number of lines that will be stored in .bash_history. You only have to change the value of the global bash variable $HISTFILESIZE. For much more details have a look at the bash man-page.

We use sort, uniq and head to get the top 10 recently used command.
Read the rest of this entry