Skip to content

Instantly share code, notes, and snippets.

@abhiomkar
Created May 22, 2013 10:59
Show Gist options
  • Save abhiomkar/5626767 to your computer and use it in GitHub Desktop.
Save abhiomkar/5626767 to your computer and use it in GitHub Desktop.
Most used commands in ZSH
# Top 20 most used commands in your ZSH shell
cat ~/.zsh_history | cut -d ';' -f 2- | awk {'print $1'} | sort | uniq -c | sort -r | head -20
@robinmitra
Copy link

robinmitra commented Mar 31, 2018

For it to work as a ZSH alias, the $ sign will need to be escaped like below:

cat ~/.zsh_history | cut -d ';' -f 2- | awk {'print \$1'} | sort | uniq -c | sort -r | head -20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment