看看自己常用的命令

想不想知道自己平时用的最多的linux命令是哪些吗?

history | perl -n -e ‘split(/s+/,$_,5); print $_[4],”n”‘ | tr “|” “n” | awk ‘{print $1}’ | grep -E “^w+$” | sort | uniq -c | sort -nr | head -n 20

这行脚本可以统计出来。还包括了用管道执行的命令。比如tail xxxx|grep xxx里的grep。

 

 

4 thoughts on “看看自己常用的命令

  1. 小花 November 1, 2008 / 11:31 pm

    原来神仙这里有一行统计脚本啊,嘿嘿,我爱例子!perl还完全没看,正则表达式也快忘掉了……正好拿这段学习^_^

  2. August 24, 2008 / 5:14 pm

    仙居人才

  3. 小路 August 21, 2008 / 10:48 pm

    你顺便把这行脚本一一解释一遍多好啊…授人以鱼,不如授人以渔

  4. だんご August 20, 2008 / 4:18 pm

    不是吧…用LINUX…
    你用的指令我都用不到….
    我一般就PS下…LS下…

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s