显示最常用的shell命令。
shellstats的Python项目详细描述
shellstats读取您的shell历史并显示最常用的 命令。典型输出如下:
Command Count Percentage 1 ls 326 17.0% 2 cd 254 13.3% 3 less 172 8.99% 4 sudo 162 8.47% 5 emacs 159 8.31% 6 screen 146 7.63% 7 echo 103 5.38% 8 top 100 5.23% 9 du 85 4.44% 10 grep 70 3.66%
安装
只需简单地安装即可:
$ pip install shellstats
此外,如果要查看上述输出的饼图,则需要 要安装matplotlib(在 debian/ubuntu/fedora)。
用法
Usage: shellstats [OPTIONS] Print the most frequently used shell commands. Options: --n INTEGER How many commands to show. --plot Plot command usage in pie chart. --command TEXT Most frequent subcommands for command, e.g. sudo, git. --history-file PATH Read shell history from history-file. --shell TEXT Specify shell history format: bash, fish or zsh. --help Show this message and exit.