blog.poucet.org Rotating Header Image

November 20th, 2007:

Small note of practicality

Well,

It has been a while since I last blogged. Been busy with travelling as well as working on my phd. But I thought I’d drop a little note.

If you’re like me, you like having all your files that you under one subdirectory. I mean, sure, I have my PDFs elsewhere (some subdirectory of Documents), but I have all my code and projects under ~/work. The nice thing of this is that it’s really easy to backup your stuff, just tgz that directory and drop it on a thumbdrive or another computer. But then what about your settings?

One option is to simply tgz your entire home directory, but I prefer not doing that as my Documents, for instance, is filled with several gigabytes of pictures from trps etc. That’s not something that needs such frequent backups. If I were to tgz my entire home dir, I would not be able to easily carry it with me on a thumbdrive.

So what then? Well you could always save settings manually, after all they don’t change so often. But this is a pain as you have to hunt them down each time.

Fortunately, linux has a rather simple system to put files in one place when they’re actually somewhere else. Symlinks :) Now I have all the settings of the applications I care about (and only those) in ~/work/settings and then simply symlink them to my home-dir. What I have in there is my .vim files, my .emacs stuff, as well as startup scripts for various interpreters (for now lua and scheme).

In reaction to the comments regarding source-control systems
I do use darcs, but not for the entire ~/work directory. I have several projects, as well as publications and other stuff. Some files I do not want versioned (for instance large data-files for certain benchmarks). Therefore I have something like:


~/work/documents/publications/pub1/_darcs
~/work/documents/publications/pubN/_darcs
~/work/projects/project1/_darcs
~/work/projects/projectN/_darcs
~/work/playground/language1/_darcs
~/work/playground/languageN/_darcs

I have other stuff in there as well, but it was just to give you an idea. Now I often backup my entire work dir using the tgz file I mentioned. The question then was, how do you easily add your settings to that without mucking about too much. And that’s how I came to this rather silly blogpost.


I know this isn’t revolutionary, or even that complicated, but perhaps someone who hadn’t though of it yet might like this solution. And I promise to write more often and on a more interesting topic next time.