看看你在Linux下最常用的命令是哪些? 在Linux或者Mac的Terminal下执行下面的命令就可以:
1 | 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 |
Show 一下我在 MBP 上的历史命令:
1 | sakishum$ 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 |
没有用啥高级命令唏嘘
Done.