美文网首页
你最常用的几个SHELL命令是什么?

你最常用的几个SHELL命令是什么?

作者: _TheSpecialOne | 来源:发表于2019-05-16 11:56 被阅读0次

    只需要阅读1分钟

    我先开始:
    1   2066  17.3395%     git
    2   1919  16.1057%     npm
    3   572   4.80067%     docker
    4   468   3.92782%     sh
    5   418   3.50818%     ll
    

    这里有一个很有趣的宝贝叫做 the-book-of-secret-knowledge. (一个非常好的知识和技巧集合,适合所有的 terminal 用户)

    你也许会好奇,如何统计出 command 使用率的,以下命令
    可以显示你最常用的 command 以及使用率。

    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 5
    

    这个代码段叫做 list-of-commands-you-use-most-often , 你可以在 the-book-of-secret-knowledge 找到。

    大家如果可以分享一些自己常使用命令,应该会很有趣。

    注意

    相信我可以不用说这句,但是还是提醒一些, 请在你分享之前,检查一遍,注意不要分享自己的个人信息

    原文地址: https://dev.to/ecologic/what-are-your-five-most-used-terminal-commands-1hmd

    感谢阅读。

    相关文章

      网友评论

          本文标题:你最常用的几个SHELL命令是什么?

          本文链接:https://www.haomeiwen.com/subject/ryvbaqtx.html