What’s in my history?

Geek @ 13 April 2008, “3 Comments”

This meme is spreading in the tech/geek blogosphere these days, it’s fun to join.

$ history|awk '{a[$2]++} END{for(i in a){printf "%5d\t%s\n",a[i],i}}'|sort -rn|head
  237   git
   71   ant
   58   ll
   26   cd
   24   gvim
   19   sudo
   17   exit
   11   vi
    5   du
    5   cat

Some notes:

  1. I started playing with git last few days, that’s why it reaches the top, and I use esvn for most of Subversion commands, so svn won’t end up here;
  2. my laptop disk space is getting filled up, that’s why the du;

Now, what’s in your history?

3 Responses to “What’s in my history?”

  1. Anonymous Says:

    history|awk ‘{a[$2]++} END{for(i in a){printf “%5d\t%s\n”,a[i],i}}’|sort -rn|head

  2. erning Says:


    $ history|awk '{a[$2]++} END{for(i in a){printf "%5d\t%s\n",a[i],i}}'|sort -rn|head
    108 ls
    89 cd
    60 svn
    57 ssh
    20 vi
    17 sudo
    16 rm
    16 grep
    11 ping
    7 ps

  3. haokanshu Says:

    web:~# history|awk ‘{a[$2]++} END{for(i in a){printf “%5d\t%s\n”,a[i],i}}’|sort -rn|head
    120 ls
    98 cd
    43 vim
    40 l
    29 exit
    19 crontab
    18 /usr/local/mysql/bin/mysql
    17 more
    13 ping
    12 ./awstatm

Leave a Reply