What does your .bash_history say?

A friend of mine told me that on techie blogs there is a new meme going on: show off the most used commands, starting from shell history:

history | \
 awk '{a[$2]++}END{for(i in a){print a[i] " " i}}' | \
 sort -rn| head -15

I've got 20 times the default bash history size (10k lines), so it'll yield interesting results. I also use the history timestamp feature, so a little sed strip timestamps out.

Let's see:

 13:19:50 vjt@voyager:~/code$ history | 
     sed 's#^[ 0-9\[\/\:]*\]\([^ ]*\).*#\1#' |  
     awk '{a[$1]++}END{for(i in a){print a[i] " " i}}' | 
     sort -rn | head -15
928 l
577 ssh
389 ping
381 cd
300 dig
259 telnet
153 sudo
126 ifconfig
125 whois
113 ps
96 svn
91 cat
73 fg
68 vi
61 ..

yeah, I do a *LOT* of ls, l is actually ls -alFGs (I'm on Darwin). This list exposes my recent habits, because I'm coding less and managing more (no gcc, no irb, lots of dig & whois). svn is still there, of course Eye-wink. ssh means that these results should be aggregated with other histories coming from the other boxes I log on to.. but that's a topic for anoter post Eye-wink.

Which are your results?

Post them here! Laughing out loud

UPDATE 2008-06-03

As my recent habits are more coding than writing docs, I re-ran the history analysis.. and these are the new results:

1796 l
981 svn
705 ssh
693 cd
666 ping
402 vi
356 ifconfig
352 telnet
321 dig
315 sudo
283 fg
240 grep
188 ..
183 cat
157 ps

heh. nifty. Smiling.

Comments

COOL

COOL Laughing out loud

prot

grattuggia:~$ history | awk '{a[$2]++}END{for(i in a){print a[i] " " i}}' | sort -rn| head -15
59 exit
54 cd
52 ls
42 netstat
33 man
25 sudo
25 ssh
25 bc
21 cat
11 less
11 ioreg
11 fgrep
10 host
10 grep
9 ping

What emerges: peluche

What emerges: peluche doesn't use ^D to close its terminals. He frequently looks for open and closed ports on its system and, as a proud geek, often looks at the manual pages.

He doesn't code, because spends lots of time with ioreg on his 8-Core MacPro Laughing out loud.

lulz! Laughing out loud
--
il vero sballo e` dire SUX

uhm

1 86
nemesis:~ snagg$history | awk '{a[$2]++}END{for(i in a){print a[i] " " i}}' |sort -rn| head -15
57 cd
54 clear
44 ls
34 sudo
29 socat
26 ping
24 gcc
23 ps
23 gdb
21 vi
20 less
13 rm
13 ftp
10 make
8 ifconfig

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <pre>
  • Textual smileys will be replaced with graphical ones.
  • Inline assets are allowed.
  • You can use BBCode tags in the text, URLs will automatically be converted to links.

More information about formatting options

============================================================================================================================================