Oldest files meme

An entry published by James Bennett on January 3, 2009, Part of the categories Meta and Misc. 11 comments posted.

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:

  1. Some Emacs extensions in ~/.elisp.
  2. My SSH keys in ~/.ssh.
  3. A Subversion auth file.
  4. Some irssi configuration files.
  5. Some lftp configuration files.

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?

On January 3, 2009, Elliott Hird said:

I have so much stuff in ~ that it hasn’t finished running yet, and probably won’t any time soon…

On January 3, 2009, @jcsalterego said:

I recently discovered lftp and it is indeed awesome. irssi is 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/^A keyspace conflict. How do you deal with that? (I use C-a quite often in emacs.)

On January 3, 2009, Doug said:

I have this in my ~/.screenrc file:

# Use C-O instead of C-a as this makes more sense for Emacs
escape ^Oo
On January 3, 2009, Sean said:

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 using repr in 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).

On January 3, 2009, Sean said:

…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:

escape “
On January 3, 2009, Rob said:

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

On January 3, 2009, @jcsalterego said:

Sean, what exactly is that line?

escape ^Oo looks pretty awesome — thanks Doug!

On January 3, 2009, Sean said:

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.

On January 3, 2009, Doug Hellmann said:

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. :-)

On January 3, 2009, Deron Meranda said:

.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.

On January 8, 2009, Paul Smith said:

One-liner:

find . -print0 | xargs -0 stat -c ‘%y %n’ | sort | less

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.py being 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.

Comments for this entry are closed. If you'd like to share your thoughts on this entry with me, please contact me directly.

ponybadge