Top 10 commands you have typed on your console!

Type in the following script on your terminal prompt:

history | awk ‘{CMD[$2]++;count++;}END { for (a in CMD)print CMD[a] ” ” CMD[a]/count*100 “% ” a;}’ | grep -v “./” | column -c3 -s ” ” -t | sort -nr | nl | head -n10

you will get top 10 commands yu typed so far on your prompt.
in my case it is as folklowing:
1 114 22.8% vim
2 74 14.8% gcc
3 55 11% cd
4 27 5.4% exit
5 25 5% sudo
6 17 3.4% chmod
7 17 3.4% cat
8 12 2.4% python
9 10 2% ls
10 10 2% g++

what is yours???

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s