[Ilugc] [Tip] Find out the Most used command

  • From: jemenisuresh@xxxxxxxxx (Tha.Suresh)
  • Date: Thu Aug 26 00:21:40 2010

 Find out the Most used command

$ history | awk '{a[$'$(echo "1 2 $HISTTIMEFORMAT" | wc  -w)']++}END{for(i
in a){print a[i] " " i}}' | sort -rn | head

EX:

451 sudo
56 gammu
49 cd
33 python
27 gnokii
23 echo
19 ls
17 history
15 wtf
13 vim



-- 
Regards,
Tha.Suresh
http://thasulinux.wordpress.com

Other related posts:

  • » [Ilugc] [Tip] Find out the Most used command - Tha.Suresh