After drink meme, I got another meme to play with, New Year’s meme: What are the oldest files in your home directory?, first started by Brandon Rhodes.
1 Rules
- Run the following script in your home directory. (You might want to use less to read the output.)
- Ignore files whose date does not reflect your own activity.
- List the oldest files in a blog post and discuss!
#!/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
Only include files whose last-modified time is a date on which you really touched the file. The file’s time should neither result from an error (a few files beneath my own home directory have an incorrect date of 1970-01-01), nor from unpacking someone else’s archive that has old files inside of it.
But there is no requirement that the actual content of each file you list be your own. Whether you wrote the file yourself long ago, or downloaded it from some ancient and forgotten FTP site, you have a story to share!
2 My files
# The first day I started to use Pidgin on Linux?
2007-08-29 ./.purple/logs/jabber/[my_email]@gmail.com/[a_contact]@gmail.com/2007-08-29.160713+0800CST.html
# The day I started to run my own server at home, shutdown months later due to noise from fans
2008-04-11 ./tmp/thetinybit/etc/ppp/chap-secrets
Nothing really old because of a harddisk failure in 2005. I lost all my data, photos, documents, etc. After that tragedy, I usually don’t store anything on my computer except raw images/music files/or files I would use often.
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.