Wednesday, April 16, 2008

You Can Tell a Lot About a Man by Looking at His Bash History

~ $ history | awk {'print $2'} | sort | uniq -c | sort -k1 -rn | head
 159 ll
 149 cd
  47 git
  27 rake
  23 mysql
  15 cat
   8 sudo
   7 ssh
   7 exit
   7 bg
OK, I tag Jeremy, David, and Chris

2 comments:

Joe Grossberg said...

Assuming that's not a new computer -- you should juice up your history a bit.

Add the following to your .bashrc :

export HISTSIZE=20000
export HISTFILESIZE=20000
export HISTTIMEFORMAT="%FT%T "

It'll greatly increase the size of your .bash_history file, giving you access to a much longer history.

Also, the time format, indicating *when* you did things, is useful too.

Tim Harper said...

One year later:

568 git
327 cd
210 ll
160 ssh
92 cap
77 gst
64 cdmar
47 script/console
44 vim
36 cucumber