% history 1 | awk '{a[$2]++ } END{for(i in a){print a[i] " " i}}'|sort -rn|head 320 git 112 ll 80 cd 48 ls 24 less 20 man 19 happygiraffe.net 17 sudo 15 rm 14 xattr
NB:
- This is at home, not work. At work, there’s significantly more
git
,ant
,mvn
andmate
. - I turn all my ssh known_hosts entries into command line aliases, hence “happygiraffe.net”.
- I’ve only just found xattr, so I’ve been playing with it.
- zsh only lists 25 history items by default. I have to ask it to start from the beginning.
- I obviously do too much as root.
As always, I can’t resist tinkering with the shell. I’d have written it as history 1 | awk '{print $2}' | sort | uniq -c | sort -rn | head
.