Shell history stats

Okay, I’ll bite:

stanley: ~
$ history|awk '{a[$2]++ } END{for(i in a){print a[i] " " i}}'|sort -rn|head
201 host
46 bzr
43 ls
40 cd
32 sudo
22 vi
19 scp
12 clear
11 ./push-live
9 wget

Amusing aberration at the top there. 😉

This entry was posted in General and tagged , , , . Bookmark the permalink.

10 Responses to Shell history stats

  1. Ole says:

    Too much to type:

    $ history | awk ‘{ print $2 }’ | wf -s | head


  2. matthew says:

    I’ll join in the fun…

    166 sudo
    63 cd
    62 ls
    41 clear
    22 rm
    10 ssh
    9 fglrxinfo
    8 tar
    7 rsync
    7 man

    I posted it on my blog, too, with a link.

  3. TimC says:

    From my perpetual never truncated history list:

    > awk ‘{a[$1]++ } END{for(i in a){print a[i] ” ” i}}’ ~/.bash_fullhistory | sort -rn|head -n 32
    5809 l #alias for ls -lA –color=auto
    3279 sudo
    2442 cd
    1191 less
    1118 cat #a crappier version of `less’
    1063 ps
    1055 grep
    969 fg
    802 cvs
    731 man
    615 dpkg
    553 wget
    531 apt-cache
    528 opfloat #an overly complicated perl script that is a commandline calculator
    499 mvi #an alias to mv -i that I install on all my systems, so that I don’t get into the habit of relying on any machine having “mv” aliases to “mv -i”. On my own systems, “mv” gets aliased to something that beeps on the terminal and tells me I’m an idiot. When I log into someone elses machine, I run “mvi”, and it comes back with “bash: mvi: command not found”, and then I redo the command with “mv -i”, carefully.
    465 killall
    459 slrn #is that where all my day goes?
    459 locate
    439 for
    435 g #escapes the arguments and passes them to a browser to open google
    415 ( #Go away, before I replace you with a very small shell script
    399 cvscolordiff #I like colors. I like diffing cvs repositories
    375 sync
    373 pico #I can’t explain this one. Invoking pico more often than my script which connects to a running xemacs process. My only excuse is that I have window manager bindings to connect to xemacs, and I never close buffers, so I just have to C-x b to them.
    371 rmi
    301 bg
    290 l- #My fingers mess up the space and dash in “l -tr” etc all the time, so rather than fixing my fingers, I defined a function “l-” to run ls -lA –color=auto -“$@”
    287 .. #aliased to the obvious
    285 find
    244 df

  4. Hooper says:

    Hmm, what to make of this?

    707 ls
    378 cd
    337 stg (stacked git; a program to manage patches on top of git)
    286 vim
    258 git (git distributed SCM)
    221 grep
    202 less
    200 exit
    176 svn (subversion SCM)
    164 hg (Mercurial distributed SCM)
    151 mutt
    148 ssh
    103 cvs (CVS SCM)
    89 find
    83 man
    77 cat
    67 make
    59 diff
    53 rm
    48 pushd

  5. ToddT says:

    pretty vanilla:
    129 ls
    101 cd
    98 smart #Smart package manager
    28 service
    28 mount
    26 tail
    25 vi
    25 less
    23 exit
    22 find

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Comments will be sent to the moderation queue.