Last active
October 7, 2015 15:08
-
-
Save techmaniack/3184002 to your computer and use it in GitHub Desktop.
One liner to show the top ten commands used on the system
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This one-liner will read the ~/.bash_history file and give the top ten most frequently used commands | |
$ cat ~/.zsh_history \ | |
| cut -f2 -d ";"\ | |
| cut -f1 -d " "\ | |
| awk '{c [$1]++}END{for(j in c)print j,""c[j]""}'\ | |
| sort -hr -k2\ | |
| head \ | |
| column -t |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This one-liner will read the ~/.zsh_history file and give the top ten most frequently used commands | |
$ cat ~/.zsh_history | cut -f2 -d ";" | cut -f1 -d " " | awk '{c [$1]++}END{for(j in c)print j,""c[j]""}' | sort -hr -k2 | head | column -t |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment