Nobody can resist the force of a Silly Internet Meme. “Mom, Mark made me do it.”

~/ongoing/ 549> history|awk '{a[$2]++} END{for(i in a){printf "%5d\t%s \n",a[i],i}}'|sort -rn|head
  127	cd 
   90	ls 
   31	scp 
   26	find 
   25	lh 
   16	ossh 
   14	vi 
   12	ruby 
   10	rm 
    9	ong 

Let’s see, “scp” is how pix get to “lh” is an alias for ls -lt $@ | head -10. “ossh” gets me to “ong” updates this blog. Of course, this doesn’t reflect the always-on Emacs and NetBeans, where most of the real work happens.

I ain’t tagging anyone.


Comment feed for ongoing:Comments feed

From: Patrick (Apr 16 2008, at 03:16)

Felicity:~ patrick$ history|awk '{a[$2]++} END{for(i in a){printf "%5d\t%s \n",a[i],i}}'|sort -rn|head

118 cd

67 ls

50 ssh

26 git

25 cvs

24 ps

20 cvsrm

16 rssh


11 telnet

cvsrm is an alias for "rm $1 && cvs rm $1", rssh for "killall -HUP ssh", SVN manages not to appear because I interact with it entirely from Xcode or TextMate.


From: roberthahn (Apr 16 2008, at 05:56)

ooh! I like that lh idea. Added to my .bash_profile, thanks!


From: Mark (Apr 16 2008, at 08:53)

Can someone explain to us civilians what ls -lt $@ | head -10 does?

It seems to list up a bunch of server logs on our server, and a bunch of directories on my Mac.


From: Tim (Apr 16 2008, at 10:03)

Mark, that "lh" incantation lists the files that are most recently updated. Without arguments, in the current directory. If you say

"lh *.java"

You get the most recently updated *.java files.


From: Todd Sayre (Apr 16 2008, at 10:20)

todd@Ethics-Gradient:~/Documents/Rails/cbdb1.5/vendor/plugins/orderific$ history|awk '{a[$2]++} END{for(i in a){printf "%5d\t%s \n",a[i],i}}'|sort -rn|head

83 svn

79 sudo

67 rake

65 cd

48 ls

21 ll

19 history

17 la

13 port

8 rm

ls is an alias for 'gls --color=tty'

ll is an alias for 'gls --color=tty -lh'

la is an alias for 'gls --color=tty -a'


From: Seth W. Klein (Apr 17 2008, at 15:56)

--- ~/new T

history | tr -s ' ' | cut -d ' ' -f 3 | sort | uniq -c | sort -rn | head -n 10

333 tasks

20 next

14 rmm

14 mail-filter

13 vim

10 ls

9 rm

9 history

8 scan

8 refile

--- ~/new T

I couldn't resist replacing the awk with something I think easier on the fingers, eyes, and brain. And incidentally, more distributable.

tasks is 840 some lines of home grown and still evolving shell/gnuplot/graphviz/html that manages my GTD stuff. mail-filter and helpers are 500 lines of shell script atop crm114 (bayesianish filtering). And yep, I use nmh for mail.


author · Dad · software · colophon · rights
picture of the day
April 15, 2008
· Life Online (2 more)

By .

The opinions expressed here
are my own, and no other party
necessarily agrees with them.

A full disclosure of my
professional interests is
on the author page.