Ask HN: Share your top 10 linux commands
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
21 comments
[ 3.6 ms ] story [ 63.1 ms ] threadIt seems like this'll be warped by a couple things, though. It only sees the first command in a pipeline (I don't see a good general solution to this...) and loops just see the loop, blocks just see the { or (, etc. It's also going to be missing hidden lines (HISTCONTROL=ignoredups, etc).
Interesting, nonetheless.
cross compiling for ARM screen:
web dev screen: Haskell dev screen (painful day today fighting with cabal):Raspberry Pi:
(was setting up a streamripper cronjob recently, so it's skewed)