Random notes from mg

a blog by Marius Gedminas

Marius is a Python hacker. He works for Programmers of Vilnius, a small Python/Zope 3 startup. He has a personal home page at http://gedmin.as. His email is marius@gedmin.as. He does not like spam, but is not afraid of it.

Thu, 10 Apr 2008

Shell commands I use most

Couldn't resist the meme that has resurfaced lately.

$ history|awk '{a[$2]++ } END{for(i in a){print a[i] " " i}}'|sort -rn|head
14780 cd
3010 svn
2366 ls
1957 ssh
1563 svnst
1285 ml
1048 bin/test
957 vi
952 sudo
837 offlineimap

'svnst' is an alias for 'svn status'. 'ml' is a little wrapper around mailcheck that reformats the output to fit on two lines.

The numbers are rather high because I added a couple of lines to my ~/.bashrc to have more history:

export HISTFILESIZE=
export HISTSIZE=50000

What's sudo doing in the top 10?

$ history|awk '$2=="sudo" {a[$3]++ } END{for(i in a){print a[i] " " i}}'|sort -rn|head
99 vi
68 apt-get
67 -s
45 ifup
40 rmmod
37 umount
37 iwconfig
35 modprobe
31 iwlist
26 powertop
posted at 16:46 | tags: | permanent link to this entry | 0 comments

Name (required)


E-mail (will not be shown)


URL


Comment (some HTML allowed)