The command to find the list of commands that you use the most is:
history | awk '{print $2}' | sort | uniq -c | sort -rn | head
I like this version because it has uses a few simple and useful commands.
My list:
11398 ls
6724 cd
5200 vim
2330 sudo
1462 mutt
1131 perl
1122 mplayer
1036 svk
825 mpc
795 lt
The lt
command is a shell alias for ls -lt
. Other people don’t have a
editor in this list. This probably occurs because they use emacs
which works
better when it is open a long time. I use vim
that way sometimes, but most of
the time I use it for small and fast changes.
The number are this high because my history limit is higher than the default. You can use the following lines to increase the limit.
export HISTFILESIZE=1000000000
export HISTSIZE=1000000
shopt -s histappend
export PROMPT_COMMAND='history -a'
You should take a look at the bash reference to find out what everything does.