Seems like a lot of Linux bloggers have been doing this recently so I thought I’d follow suit! The following command (in bash) will print the top ten commands in your shell history:
history|awk ‘{a[$2]++ } END{for(i in a){print a[i] ” ” i}}’|sort -rn|head
Of course, since I use zsh instead of bash, I had to make a few changes:
cat ~/.histfile|awk '{a[$1]++ } END{for(i in a){print a[i] " " i}}'|sort -rn|head
And my results:
88 ls
70 cd
64 sudo
64 petris
36 plato
30 vim
29 cat
26 echo
20 wine
20 make
ls, cd, and sudo are pretty standard commands that are used so it’s not surprising they come first. I clearly play petris (a tetris clone) way too often. “plato” is a custom command to connect me to my university servers. vim, cat, and echo are also pretty standard commands. I have recently begun using wine a lot to play PC games, and make to compile a load of programs :D
Popularity: 3% [?]















Recent Comments