Skip to content

Instantly share code, notes, and snippets.

@schmkr
Created January 14, 2013 09:31
Show Gist options
  • Select an option

  • Save schmkr/4528891 to your computer and use it in GitHub Desktop.

Select an option

Save schmkr/4528891 to your computer and use it in GitHub Desktop.
List your bash history top 10
cut -f1 -d" " ~/.bash_history | sort | uniq -c | sort -nr | head -n 10
@schmkr
Copy link
Author

schmkr commented Jan 14, 2013

My own top10 is now:

1289 git
1091 la
 952 cd
 312 ssh
 270 ..
 228 rm
 181 sudo
 150 subl
 118 sites
 110 find

@wspruijt
Copy link

If you're using zsh, use this:

cat ~/.zsh_history|cut -d ';' -f 2- 2>/dev/null| awk '{a[$1]++ } END{for(i in a){print a[i] " " i}}'|sort -rn|head

@wspruijt
Copy link

Mine:

2766 git
1704 ls
1362 cd
653 s
613 rails
473 rake
303 pwd
293 heroku
163 bundle
153 rm

@wspruijt
Copy link

Protip: alias sublime with s :)

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