|
運行下面的命令來看看你最常用的10條命令是什么?
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 -n 10
先貼上我的吧
1 157 31.4% ls
2 124 24.8% cd
3 30 6% clear
4 27 5.4% vim
5 19 3.8% exit
6 18 3.6% rm
7 13 2.6% sed
8 10 2% mv
9 9 1.8% javac
10 6 1.2% mplayer |
|