menu Chancel's blog
rss_feed
Chancel's blog
秋雨一何碧,山色倚晴空。

Linux命令行使用频率统计

作者:Chancel Yang, 时间:2022 Jul 19, 阅读:49

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

使用输出如下

➜  ~ 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
     1  542  14.7443%    sudo
     2  303  8.24266%    ll
     3  299  8.13384%    cd
     4  294  7.99782%    adb
     5  268  7.29053%    vim
     6  138  3.75408%    bash
     7  112  3.04679%    yay
     8  109  2.96518%    ping
     9  107  2.91077%    cat
    10  93   2.52992%    scrcpy

[[replyMessage== null?"发表评论":"发表评论 @ " + replyMessage.m_author]]

account_circle
email
web_asset
textsms

评论列表([[messageResponse.total]])

还没有可以显示的留言...
[[messageItem.m_author]] [[messageItem.m_author]]
[[messageItem.create_time]]
[[getEnviron(messageItem.m_environ)]]
[[subMessage.m_author]] [[subMessage.m_author]] @ [[subMessage.parent_message.m_author]] [[subMessage.parent_message.m_author]]
[[subMessage.create_time]]
[[getEnviron(messageItem.m_environ)]]