Ask HN: Share your top 10 linux commands

https://news.ycombinator.com/item?id=6097082
by giis • 13 years ago
7 20 13 years ago

Today I came across interesting post which displays top 10 commands from 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 is my results:

     1	135  13.5%  vim

     2	133  13.3%  gcc

     3	122  12.2%  ls

     4	52   5.2%   cd

     5	47   4.7%   less

     6	43   4.3%   grep

     7	38   3.8%   exit

     8	35   3.5%   cat

     9	29   2.9%   python

    10	25   2.5%   sudo

Related Stories

Loading related stories...

Source preview

news.ycombinator.com