I found some classic bash code on reddit this morning that shows your most frequent bash commands:

cut -d\    -f 1 ~/.bash_history | sort | uniq -c | sort -rn | head -n 10 | sed 's/.*/    &/g'

This should work with MacOS as well as linux, if you’re interested.

I’ve been running Ubuntu Lucid since alpha2 (it’s now on beta1). This is my output:

131 exit
128 sudo
43 top
25 man
19 ssh
8 python
8 ping
8 cat
7 scp
7 R

It shows a surprising amount about how you use your system.

EDIT: Props to Patrick! I had chopped off the ‘sed’ command when I cut and pasted. It has been corrected.

Advertisements