Terminal is the tool used to access the shell prompt where we type and execute commands. Users run many commands in the shell. Many of them are frequently used. A user's nature can be identified easily by looking at the commands he frequently uses. This recipe is a small exercise to find out 10 most frequently-used commands.
Bash keeps track of previously typed commands by the user and stores in the file
~/.bash_history. But it only keeps a specific number (say 500) of the recently executed commands. The history of commands can be viewed by using the command history or
cat ~/.bash_history. We will use this for finding out frequently-used commands.
We can get the list of commands ...