瞎扯淡 zsh_stats 查看你命令使用频率

administrator · 2015年07月28日 · 最后由 jxs471494539 回复于 2015年08月07日 · 4895 次阅读

感觉这个有点意思。贴下,聊表纪念。

zsh_stats_for_me

共收到 39 条回复

haha,有意思

在Mac终端运行不行吗?

哈哈,新入mac的也来凑热闹。 #4楼 @easonlovewan mac下可以哈,前提是你装了oh-my-zsh

 1  3472  34.7235%   git
 2  588   5.88059%   cd
 3  310   3.10031%   rm
 4  281   2.81028%   vi
 5  270   2.70027%   brew
 6  242   2.42024%   curl
 7  235   2.35024%   ls
 8  230   2.30023%   kill
 9  218   2.18022%   go
10  180   1.80018%   bundle
11  167   1.67017%   sudo
12  145   1.45015%   gem
13  125   1.25013%   tail
14  119   1.19012%   tnpm
15  112   1.12011%   mate
16  94    0.940094%  ps
17  92    0.920092%  rake
18  87    0.870087%  ping
19  85    0.850085%  cap
20  80    0.80008%   tig
 1 3690  36.9037%   git
 2  715   7.15072%   git-new-branch
 3  516   5.16052%   gc
 4  507   5.07051%   cd
 5  271   2.71027%   rails
 6  210   2.10021%   rm
 7  190   1.90019%   j
 8  185   1.85019%   vim
 9  177   1.77018%   rake
10  171   1.71017%   sudo
11  152   1.52015%   ionic
12  139   1.39014%   gem
13  139   1.39014%   brew
14  128   1.28013%   cap
15  122   1.22012%   bundle
16  108   1.08011%   ping
17  83    0.830083%  rvm
18  75    0.750075%  heroku
19  72    0.720072%  ssh
20  70    0.70007%   curl
 1  1393  13.9314%   ls
 2  1369  13.6914%   cd
 3  537   5.37054%   grunt
 4  524   5.24052%   docker
 5  478   4.78048%   ssh
 6  353   3.53035%   rs
 7  289   2.89029%   cap
 8  288   2.88029%   sudo
 9  217   2.17022%   rails
10  211   2.11021%   rc
11  211   2.11021%   brew
12  199   1.9902%    rake
13  198   1.9802%    vi
14  195   1.9502%    ping
15  188   1.88019%   npm
16  158   1.58016%   bundle
17  155   1.55016%   rm
18  154   1.54015%   proxychains4
19  146   1.46015%   git
20  139   1.39014%   ionic

都要被玩儿坏了.

 1  1362  13.6214%   g
 2  929   9.29093%   cd
 3  608   6.08061%   ack
 4  525   5.25053%   cat
 5  388   3.88039%   vim
 6  343   3.43034%   echo
 7  266   2.66027%   http
 8  264   2.64026%   mm
 9  256   2.56026%   ls
10  195   1.9502%    cp
11  160   1.60016%   pbpaste
12  141   1.41014%   sudo
13  138   1.38014%   mv
14  130   1.30013%   j
15  127   1.27013%   perl
16  127   1.27013%   brew
17  119   1.19012%   open
18  99    0.990099%  ping
19  92    0.920092%  curl
20  89    0.890089%  find
 1  2631  36.2347%    git
 2  539   7.42322%    docker
 3  450   6.19749%    cd
 4  448   6.16995%    ls
 5  251   3.45682%    rails
 6  238   3.27779%    exit
 7  234   3.2227%     vim
 8  210   2.89216%    bundle
 9  153   2.10715%    ansible-playbook
10  145   1.99697%    brew
11  141   1.94188%    arc
12  115   1.5838%     rake
13  89    1.22573%    docker-compose
14  88    1.21195%    rm
15  79    1.088%      gvim
16  77    1.06046%    tmux
17  76    1.04669%    sudo
18  74    1.01914%    npm
19  60    0.826332%   gem
20  59    0.81256%    ssh
 1  1426  21.309%     ll
 2  762   11.3867%    sudo
 3  649   9.69815%    cd
 4  345   5.15541%    rm
 5  312   4.66228%    vi
 6  179   2.67484%    git
 7  156   2.33114%    sc
 8  141   2.10699%    htop
 9  131   1.95756%    rake
10  116   1.73341%    ..
11  106   1.58398%    for
12  90    1.34489%    mv
13  74    1.1058%     curl
14  68    1.01614%    mkdir
15  66    0.986252%   du
16  64    0.956366%   make
17  62    0.926479%   df
18  62    0.926479%   cat
19  60    0.896593%   mtr
20  59    0.88165%    rename

sc = sudo systemctl

➜  ~  zsh_stats
     1  1329  13.2913%   git
     2  1306  13.0613%   cd
     3  591   5.91059%   rails
     4  573   5.73057%   ls
     5  555   5.55056%   rake
     6  478   4.78048%   gcm
     7  420   4.20042%   rm
     8  391   3.91039%   subl
     9  377   3.77038%   gco
    10  344   3.44034%   vi
    11  293   2.93029%   bundle
    12  182   1.82018%   gps
    13  164   1.64016%   vim
    14  154   1.54015%   ruby
    15  148   1.48015%   heroku
    16  126   1.26013%   gem
    17  118   1.18012%   brew
    18  111   1.11011%   mocha
    19  107   1.07011%   mv
    20  104   1.0401%    mkdir
 1  3047  54.7431%    git
 2  269   4.83291%    cd
 3  199   3.57528%    proxychains4
 4  147   2.64103%    rvm
 5  133   2.38951%    ruby
 6  120   2.15595%    gem
 7  119   2.13798%    exit
 8  88    1.58103%    github
 9  87    1.56306%    bundle
10  82    1.47323%    cap
11  76    1.36543%    vim
12  66    1.18577%    tat
13  52    0.934244%   rbenv
14  52    0.934244%   l
15  47    0.844413%   ssh
16  47    0.844413%   brew
17  39    0.700683%   which
18  33    0.592885%   rails
19  31    0.556953%   ssh-add
20  28    0.503054%   rake

1 2676 26.7627% git 2 1664 16.6417% cd 3 936 9.36094% ls 4 578 5.78058% brew 5 350 3.50035% gradle 6 300 3.0003% ruby 7 236 2.36024% rm 8 229 2.29023% npm 9 213 2.13021% rbenv 10 182 1.82018% df 11 145 1.45015% mvn 12 134 1.34013% gulp 13 101 1.0101% rails 14 89 0.890089% open 15 82 0.820082% clear 16 79 0.790079% gem 17 79 0.790079% export 18 74 0.740074% du 19 66 0.660066% curl 20 61 0.610061% mv

有趣,哈哈。 但是,sudo 后面的命令,全都算给了 sudo 的计数。

1   305  16.9256%    cd
 2  279  15.4828%    ll
 3  251  13.929%     ls
 4  88   4.88346%    brew
 5  87   4.82797%    git
 6  78   4.32852%    vi
 7  54   2.99667%    du
 8  53   2.94118%    df
 9  45   2.49723%    python
10  38   2.10877%    top
11  34   1.88679%    docker
12  30   1.66482%    rm
13  26   1.44284%    l
14  23   1.27636%    sudo
15  16   0.887902%   dig
16  16   0.887902%   bundle
17  15   0.832408%   ping
18  14   0.776915%   clear
19  13   0.721421%   rbenv
20  13   0.721421%   cpan

 1  320  44.5682%   git
 2  155  21.5877%   rails
 3  76   10.585%    cd
 4  53   7.38162%   ls
 5  35   4.87465%   sudo
 6  15   2.08914%   bundle
 7  10   1.39276%   rake
 8  7    0.97493%   rm
 9  7    0.97493%   fc-list
10  5    0.696379%  pwd
11  4    0.557103%  ifconfig
12  3    0.417827%  source
13  3    0.417827%  mkfontscale
14  2    0.278552%  mysql
15  2    0.278552%  irb
16  2    0.278552%  gem
17  2    0.278552%  fc-cache
18  2    0.278552%  dpkg
19  1    0.139276%  zsg_stats
20  1    0.139276%  tar
 1  228  9.60404%   gst
 2  202  8.50885%   rake
 3  193  8.12974%   rails
 4  175  7.37152%   git
 5  159  6.69756%   cd
 6  109  4.59141%   cap
 7  108  4.54928%   ssh
 8  97   4.08593%   bundle
 9  81   3.41196%   ll
10  78   3.28559%   gcmsg
11  76   3.20135%   gp
12  71   2.99073%   rubocop
13  68   2.86436%   gup
14  50   2.10615%   brew
15  39   1.6428%    egret
16  38   1.60067%   cat
17  37   1.55855%   mix
18  36   1.51643%   ember
19  35   1.4743%    guard
20  31   1.30581%   vi
 1  3315  33.1533%   git
 2  694   6.94069%   rails
 3  380   3.80038%   cd
 4  286   2.86029%   gem
 5  275   2.75028%   sudo
 6  264   2.64026%   j
 7  257   2.57026%   ionic
 8  206   2.06021%   rake
 9  175   1.75018%   brew
10  163   1.63016%   rm
11  159   1.59016%   st
12  156   1.56016%   rvm
13  131   1.31013%   gst
14  126   1.26013%   npm
15  121   1.21012%   ll
16  115   1.15012%   ping
17  107   1.07011%   curl
18  77    0.770077%  kill
19  75    0.750075%  bundle
20  73    0.730073%  meteor
 1  3243  32.4332%   git
 2  698   6.9807%    cd
 3  611   6.11061%   svn
 4  606   6.06061%   vim
 5  606   6.06061%   scp
 6  402   4.0204%    rm
 7  343   3.43034%   gem
 8  263   2.63026%   ruby
 9  250   2.50025%   cp
10  227   2.27023%   ls
11  220   2.20022%   ssh
12  168   1.68017%   mv
13  150   1.50015%   grep
14  125   1.25013%   mkdir
15  118   1.18012%   rvm
16  116   1.16012%   curl
17  107   1.07011%   cat
18  103   1.0301%    psql
19  93    0.930093%  rake
20  91    0.910091%  axel
  ~  zsh_stats
     1  2102  25.1135%    ls
     2  1322  15.7945%    cd
     3  937   11.1947%    git
     4  927   11.0753%    pwd
     5  371   4.4325%     node
     6  317   3.78734%    vi
     7  224   2.67622%    npm
     8  141   1.68459%    ssh
     9  138   1.64875%    nvm
    10  135   1.6129%     cat
    11  114   1.36201%    grunt
    12  102   1.21864%    find
    13  81    0.967742%   sudo
    14  76    0.908005%   sh
    15  73    0.872162%   ping
    16  69    0.824373%   e
    17  58    0.692951%   mongo
    18  51    0.609319%   tmux
    19  50    0.597372%   curl
    20  48    0.573477%   open
```ruby
 1  3799  37.9938%   git
 2  896   8.9609%    cd
 3  759   7.59076%   rails
 4  697   6.9707%    ls
 5  610   6.10061%   mina
 6  375   3.75038%   grep
 7  308   3.08031%   ssh
 8  207   2.07021%   rm
 9  206   2.06021%   mate
10  173   1.73017%   cp
11  172   1.72017%   rake
12  118   1.18012%   mv
13  89    0.890089%  tail
14  88    0.880088%  vi
15  86    0.860086%  ping
16  78    0.780078%  mkdir
17  75    0.750075%  curl
18  70    0.70007%   bundle
19  62    0.620062%  mvn
20  59    0.590059%  brew
 1 1194   11.9412%   ts
 2  916   9.16092%   cap
 3  596   5.9606%    git
 4  578   5.78058%   j
 5  461   4.61046%   rs
 6  449   4.49045%   ssh
 7  436   4.36044%   gcm
 8  365   3.65037%   gmu
 9  358   3.58036%   ls
10  285   2.85029%   gp
11  274   2.74027%   cd
12  253   2.53025%   mvim
13  250   2.50025%   rake
14  237   2.37024%   subl
15  225   2.25023%   d
16  211   2.11021%   g
17  181   1.81018%   tig
18  164   1.64016%   bundle
19  159   1.59016%   gtt
20  123   1.23012%   ping
 1  1774  17.7418%   vim
 2  1734  17.3417%   git
 3  755   7.55076%   cd
 4  646   6.46065%   grep
 5  448   4.48045%   rm
 6  268   2.68027%   bundle
 7  233   2.33023%   git_m
 8  223   2.23022%   mv
 9  196   1.9602%    wget
10  194   1.94019%   rake
11  168   1.68017%   cp
12  146   1.46015%   rails
13  144   1.44014%   gem
14  137   1.37014%   touch
15  136   1.36014%   gitb
16  134   1.34013%   mkdir
17  101   1.0101%    j
18  99    0.990099%  git_c
19  88    0.880088%  brew
20  84    0.840084%  scp
 1  4186  41.8642%   git
 2  1844  18.4418%   ack
 3  323   3.23032%   cd
 4  261   2.61026%   scp
 5  252   2.52025%   rm
 6  239   2.39024%   bundle
 7  228   2.28023%   rails
 8  190   1.90019%   rake
 9  179   1.79018%   cp
10  152   1.52015%   mvim
11  127   1.27013%   mysql
12  102   1.0201%    touch
13  102   1.0201%    ssh
14  92    0.920092%  curl
15  84    0.840084%  ping
16  84    0.840084%  cat
17  80    0.80008%   gup
18  77    0.770077%  mkdir
19  70    0.70007%   open
20  68    0.680068%  history
1   972  9.72097%   ls
     2  904  9.0409%    git
     3  834  8.34083%   cd
     4  492  4.92049%   cat
     5  446  4.46045%   bundle
     6  432  4.32043%   gcmsg
     7  417  4.17042%   grep
     8  402  4.0204%    rm
     9  356  3.56036%   cp
    10  293  2.93029%   gst
    11  255  2.55026%   vim
    12  240  2.40024%   ruby
    13  218  2.18022%   subl
    14  183  1.83018%   gaa
    15  153  1.53015%   open
    16  153  1.53015%   mv
    17  153  1.53015%   gem
    18  143  1.43014%   du
    19  110  1.10011%   ggpush
    20  100  1.0001%    convert

#5楼 @zouchaoge 超哥你装个 autojump,就不会有这么高的 cd 命令了

 1  1034  18.5871%    ls
 2  554   9.95866%    git
 3  505   9.07784%    cd
 4  437   7.85547%    gst
 5  270   4.8535%     vi
 6  219   3.93672%    cc
 7  216   3.8828%     fg
 8  210   3.77494%    gcc
 9  142   2.55258%    ..
10  110   1.97735%    gt
11  95    1.70771%    python
12  93    1.67176%    bundle
13  92    1.65378%    ll
14  89    1.59986%    rm
15  83    1.492%      rails
16  77    1.38415%    emacs
17  72    1.29427%    sudo
18  72    1.29427%    mkdir
19  71    1.27629%    ga
20  46    0.826892%   pip
30楼 已删除
 1  2554  25.5426%   git
 2  1480  14.8015%   cd
 3  1033  10.331%    vim
 4  857   8.57086%   ls
 5  421   4.21042%   ssh
 6  355   3.55036%   bundle
 7  330   3.30033%   rails
 8  329   3.29033%   rvm
 9  257   2.57026%   rm
10  250   2.50025%   brew
11  160   1.60016%   rake
12  135   1.35014%   cap
13  114   1.14011%   mina
14  114   1.14011%   gem
15  80    0.80008%   ruby
16  74    0.740074%  more
17  64    0.640064%  npm
18  61    0.610061%  ping
19  56    0.560056%  cp
20  54    0.540054%  ps

#28楼 @317583395 我有啊,但是我也很少用!不习惯 j .....

 1  473  20.8922%    git
 2  453  20.0088%    cd
 3  286  12.6325%    ls
 4  133  5.87456%    rails
 5  128  5.65371%    mvim
 6  79   3.4894%     curl
 7  78   3.44523%    rake
 8  77   3.40106%    bundle
 9  50   2.20848%    brew
10  38   1.67845%    mina
11  37   1.63428%    ruby
12  35   1.54594%    gem
13  32   1.41343%    sudo
14  28   1.23675%    psql
15  20   0.883392%   vagrant
16  18   0.795053%   ssh
17  18   0.795053%   mysql.server
18  17   0.750883%   ps
19  15   0.662544%   rm
20  14   0.618375%   redis-cli
$ zsh_stats
     1  25960  31.9996%     git
     2  6960   8.57925%     ll
     3  5795   7.14321%     vim
     4  3757   4.63107%     cd
     5  2813   3.46745%     ls
     6  2248   2.771%       tigs
     7  2141   2.6391%      tig
     8  1745   2.15098%     rake
     9  1493   1.84035%     rails
    10  1286   1.58519%     j
    11  1285   1.58396%     ssh
    12  1226   1.51123%     ag
    13  1174   1.44713%     rm
    14  1155   1.42371%     brew
    15  1121   1.3818%      cap
    16  1104   1.36085%     l
    17  824    1.0157%      bi
    18  798    0.983655%    bundle
    19  781    0.9627%      tmux
    20  756    0.931884%    ping
 1  174  10.5009%  git
 2  159  9.59565%  ssh
 3  145  8.75075%  cd
     4  136  8.2076%   vim
 5  129  7.78515%  rails
 6  108  6.5178%   ls
 7  90   5.4315%   bundle
 8  87   5.25045%  mina
 9  62   3.7417%   mv
10  61   3.68135%  rvm
11  60   3.621%    brew
12  37   2.23295%  ping
13  28   1.6898%   gem
14  25   1.50875%  pry
15  23   1.38805%  mysql
16  22   1.3277%   tig
17  22   1.3277%   apm
18  20   1.207%    rake
19  18   1.0863%   rm
20  16   0.9656%   ifconfig
$ zsh_stats
     1  4824  48.2448%   git
     2  1009  10.091%    cd
     3  472   4.72047%   rake
     4  456   4.56046%   rails
     5  436   4.36044%   subl
     6  276   2.76028%   ls
     7  242   2.42024%   cap
     8  198   1.9802%    vim
     9  170   1.70017%   ssh
    10  136   1.36014%   rm
    11  134   1.34013%   bundle
    12  119   1.19012%   stree
    13  94    0.940094%  brew
    14  83    0.830083%  ruby
    15  72    0.720072%  curl
    16  70    0.70007%   gem
    17  61    0.610061%  irb
    18  57    0.570057%  knife
    19  48    0.480048%  ansible-playbook
    20  45    0.450045%  upgrade_oh_my_zsh

upgrade_oh_my_zsh 我是个更新狂 😄

#11楼 @tzwm 你也有ansible-playbook 啊,有啥心得,分享分享?

➜  ~  zsh_stats
     1  607  14.7437%    gs
     2  516  12.5334%    rake
     3  396  9.61865%    gd
     4  265  6.43673%    ga
     5  253  6.14525%    gcmsg
     6  245  5.95094%    cd
     7  242  5.87807%    bundle
     8  209  5.07651%    rails
     9  147  3.57056%    subl
    10  142  3.44911%    git
    11  118  2.86616%    gpo
    12  110  2.67185%    gpr
    13  106  2.57469%    gco
    14  103  2.50182%    gl
    15  75   1.82171%    gck
    16  57   1.3845%     gb
    17  55   1.33592%    ll
    18  40   0.971581%   rm
    19  29   0.704396%   brew
    20  28   0.680107%   which
~  zsh_stats
   1  1042  10.421%    gc
   2  988   9.88099%   git
   3  716   7.16072%   gco
   4  676   6.76068%   gst
   5  644   6.44064%   gd
   6  553   5.53055%   ack
   7  538   5.38054%   vim
   8  469   4.69047%   gp
   9  426   4.26043%   ga
  10  393   3.93039%   gl
  11  346   3.46035%   zt
  12  332   3.32033%   rake
  13  329   3.29033%   cd
  14  251   2.51025%   rails
  15  180   1.80018%   guard
  16  178   1.78018%   ls
  17  140   1.40014%   rm
  18  135   1.35014%   rvm
  19  113   1.13011%   zr
  20  110   1.10011%   bundle
需要 登录 后方可回复, 如果你还没有账号请点击这里 注册