Organizing your home directory is a pain. And then you get to maintain it. ;)

Finding an organization that works for you is the difficult part, largely because we get our unix accounts without needing to have a MS in Library Science. I gave a presentation that showed why, but essentially, there's no silver bullet solution. The best thing to do is to standardize on a directory structure and then stick to it.

Once you've settled on a directory layout, keeping it in Subversion (or some revision control system) is a wickedly good thing for three reasons, 1] all changes are revision controlled, 2] changes are propagated out to my other machines easily, and 3] revision control keeps you thinking about maintenance, which keeps your directory tree usable. And it's also easy to do:

# install subversion sudo apt/emerge/whatever subversion # set up your repository sudo svnadmin create /var/svn/$USER # import your current homedir svn import -m "New" $HOME /var/svn/$USER # move current homedir someplace to be deleted sudo mv /home/$USER /tmp/deleted_$USER # rebuild your homedir from the repository sudo svn co /var/svn/$USER /home/. # fix permissions sudo chown -R $USER /home/$USER

As I've said before I prefer Unison to Subversion for synchronizing my home directory. Here's why: Once everything is setup syncing is typically just one command even when adding files. In Subversion whenever you add a file you need to do an 'svn add' to add it to the repository. Of course, depending on how you have your Unison configs setup there may still be times when you need to modify them, but if you're intelligent about how you set them up in the first place you rarely need to. Also, with Unison I can setup different configs for different machines so only the necessary files are synced to each one. For example, on machines that don't run X I don't really need my .Xdefaults etc. Granted there are things that make Subversion nicer in some ways than Unison (eg history). It's a matter of preference, but I thought throw my 2 cents in anyway. -- David W