/ Published in: Bash
URL: http://benstraw.com
Lists the top 10 commands in your history file.
Thanks Ben!
Here's an example session:
May12 10:39:18 book> ~/Documents/n_s/tools/command-history.sh
162 quite
110 svn
107 ruby
61 curl
39 rwget
34 grep
33 cd
21 lwp-request
19 fg
17 ls
Expand |
Embed | Plain Text
history | awk '{a[$2]++}END{for(i in a){print a[i] " " i}}' | sort -rn | head # Full sousveillance version: history | awk '{a[$2 " " $3 " " $4 " " $5]++}END{for(i in a){print a[i] " " i}}' | sort -rn | head -n+25
You need to login to post a comment.
