Last Updated: February 25, 2016
·
2.339K
· ericraio

See your top 10 most used terminal commands

This is a neat trick to see what terminal commands you use most. I like to use this line of code to see where I can be more efficient within terminal.

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

7 Responses
Add your response

My version is a little bit longer:

function most-used --description 'Print most used commands'
  history | awk '{print $1}' | sort | uniq -c | sort -rn | head $argv
end
over 1 year ago ·

Cool. I posted a tip similar to this in the past, with some nice suggestions by other devs: https://coderwall.com/p/o5qijw.

over 1 year ago ·

218 git
49 ls
38 cd
22 sudo
21 composer
19 bower
14 nano
13 ssh
12 al
9 grep

over 1 year ago ·

gxela php developer?

My top:

110 ssh
92 cd
78 ls
57 ping
54 git
24 vi
10 dig
7 ll
6 ifconfig
6 cat

over 1 year ago ·

My most used

3251 g
1051 e
 877 ls
 753 rm
 690 y
 475 cat
 358 less
 355 sudo
 351 cd
 302 echo

Pretty big usage of Git and Vim.

over 1 year ago ·

127 ls
100 cd
97 git
62 gs
33 open
10 sh
9 install
7 npm
7 node
6 mocha

over 1 year ago ·
over 1 year ago ·