Discussion

Ask HN: What are your top 10 most used CLI tools?

The following should work in bash/zsh

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

Mine are:

     1 1922  19.1244%     cd
     2 1398  13.9104%     git
     3 1228  12.2189%     fig
     4 590   5.87065%     open
     5 497   4.94527%     echo
     6 309   3.07463%     ls
     7 275   2.73632%     man
     8 183   1.82090%     heroku
     9 175   1.74129%     defaults
    10 175   1.74129%     curl
Source: https://superuser.com/questions/250227/how-do-i-see-what-my-most-used-linux-command-are
13 points brendanfalk 6 years ago 12 comments

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton