My ten most-frequently-used shell commands

Here they are:
$ history|awk '{a[$2]++ } END{for(i in a){print a[i] " " i}}'|sort -rn|head
80 cd
59 svn
49 bzr
40 sudo
35 vi
32 nosetests
26 l
15 rfcomm
14 screen
14 c

l is an alias for ls and c is an alias for clear. rfcomm is how I connect to my mobile phone over a virtual serial port via bluetooth.

I’m happy that vi and nosetests are right next to each other. It looks like I’m pretty good about rerunning my test cases after editing.

I got the idea for this post from this guy.

Published by

matt

My name is Matt Wilson and I live in Cleveland Heights, Ohio. I love random emails from strangers, so get in touch! matt@tplus1.com.

  • Martin Andrews

    Hmm – here is what I got:

    166 vi
    121 curl
    115 winto
    98 ssh
    45 ping
    44 cvs
    43 dig
    39 grep
    32 ./test-dc2-dc3
    32 cd

    This is just from my base machine at work – but since I generally work on many dozens of server I suppose I should come up with a really clever script to tally across all of them. For decoding – winto is an alias for screen/ssh and test-dc2-dc3 was a script i was working on to test tonights network maintenance. Not surprising that 4 of my top 5 command involved connecting to other machines. Interesting to see that vi is still the top.

  • Hi Martin!

    You absolutely should write that script to grab logs from all those boxes.

    Anyhow, a good reason to never upgrade to python 2.5 is that 2.5 includes sqlite in the standard library.

  • Ben

    Matt & Martin…

    `history|perl -lane ‘$h{$F[1]}++;END{print”$h{$_} $_”for(sort{$h{$b}$h{$a}}keys%h)[0..9]}’`

  • Ben

    Eeek.. ignore the backtics..

  • Pollockyu

    You got a nice blog up there.

    regards
    james kails
    ______________________________________________
    watch smallville Episodes | pet sitting fort worth | Colorado Modular homes