Ask HN: Share your top 10 cli commands

https://news.ycombinator.com/item?id=14788864
by aleyan • 9 years ago
10 25 9 years ago

We have last done this a few years ago. Below command will output the top 10 commands from your history file:

$ 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

Here are my results. 1 293 58.6% git 2 30 6% sudo 3 30 6% npm 4 20 4% ls 5 14 2.8% scp 6 13 2.6% cd 7 9 1.8% ssh 8 9 1.8% history 9 8 1.6% rm 10 5 1% pwd

Related Stories

Loading related stories...

Source preview

news.ycombinator.com