Doug Hellmann has brought a meme to my attention, and I’d be remiss in my duties if I didn’t act upon it.
Here’s how it’s supposed to work. Save a copy of this Python script, say as a file named oldest.py:
#!/usr/bin/env python """Print last-modified times of files beneath '.', oldest first.""" import os, os.path, time paths = ( os.path.join(b,f) for (b,ds,fs) in os.walk('.') for f in fs ) for mtime, path in sorted( (os.lstat(p).st_mtime, p) for p in paths ): print time.strftime("%Y-%m-%d", time.localtime(mtime)), path
Then run it in your home directory (using less to page through results, since there’ll probably be a lot of them):
python oldest.py | less
And talk about the oldest files there (which is to say, the oldest files you personally had something to do with).
I started working at the Journal-World in February 2006, and I’m actually on my second company-issued laptop, so I paged ahead through all the various Mac framework files (which have misleading timestamps dating back to when someone at Apple last changed them) to the period when I actually started working here, and found the oldest stuff I’d personally done (most of which has had mtime lovingly preserved by various migration/restore processes). That turns out to be a rough tie between a few things, all within a few minutes of each other:
~/.elisp.
~/.ssh.
After that come a few copies of tax forms (since I was doing my final round of taxes from freelancing around that time), then more mundane stuff like copying over some music into iTunes.
This probably says a lot about what I consider to be essential for a machine I’ll be using in day-to-day work: I pretty much live in Emacs (that’s GNU Emacs, running inside a screen session inside a terminal window, btw), I use SSH all the time, we use Subversion both for the main Django repository and at work, I use irssi (also running in the screen session) for IRC and lftp is the One True FTP client.
All of these files are still used on a daily basis today (and in fact were being used daily on the older laptop I migrated from and should run this on later, and on the still-older desktop machine I migrated from before that…).
Anybody else want to have a go?
Comments for this entry are closed. If you'd like to share your thoughts on this entry with me, please contact me directly.
I have so much stuff in
~that it hasn’t finished running yet, and probably won’t any time soon…I recently discovered
lftpand it is indeed awesome.irssiis also very much wonderful.Having been an avid emacs user as well for several years, I avoid the screen+emacs combination, because of the
C-a/^Akeyspace conflict. How do you deal with that? (I useC-aquite often in emacs.)I have this in my ~/.screenrc file:
I have `
escape`in my .screenrc for convenient one-finger access to screen shortcuts. I rarely use backtick in anger and when I do a double-tap on the key isn’t onerous (after all we should all be usingreprin Python and$()for shell-embedding these days).Ironically I had to use 8 separate backtick characters to get the first code span above right (assuming I did).
…and sure enough the Markdown processor I checked with appears to have different rules for escaping backticks to the one used by this blog. How about I try a less complex approach:
My .screenrc contains:
A lot more fun than I thought. I’ve rebuilt all my configurations from scratch several times over the years, so my oldest files are bits of old archive that never got filed to permanent cold-storage. http://v.cx/2009/01/oldest_files
Sean, what exactly is that line?
escape ^Oolooks pretty awesome — thanks Doug!jcsalterego: Yes, it’s still not right is it? Second time I assume Smartypants or equivalent meddled with it.
The line in my file is
escape <backtick><backtick>(where those are actually literal backtick characters) - so to switch to the next screen window I hit backtick then space, for a new window backtick then ‘c’ and for a literal backtick I hit backtick then backtick again.Hmm, I have a bunch of old config files, too. My .bashrc and .emacs are touched once in a while, so they’re new. But I have an old .zope-external-edit from 2006. :-)
.nethackrc from June 1991
My .emacs is also pretty old.
Also, I use ^T for my screen escape, since that’s the emacs combo I tend to use least often.
One-liner:
I have a checked-out SVN of Python 2.5.2 below my $HOME, and some of the oldest files in the results are from the repo, circa 1992,
Lib/plat-irix5/GL.pybeing the oldest (1992-01-24).Perhaps the most interesting thing I learned was how many files lying around have obviously wrong
mtimes, like 1901. A few files from the Better Gmail Firefox extension were like that.