0

List top 10 terminal commands

If you want to find out your 10 most used terminal commands in a bash shell you can use the following command. This also works in OSX:

history | awk '{a[$2]++ } END{for(i in a){print a[i] " " i}}'|sort -rn |head -n 10

Mine are:

  • 125 ls
  • 105 cd
  • 43 git
  • 39 ping
  • 37 ssh
  • 34 exit
  • 13 ruby
  • 12 rvm
  • 10 rm
  • 7 sudo

Jason Edwards