15Jul/101
Keep your dotfiles in sync with Ubuntu One
Do you have any customized dotfiles (like .vimrc, .bashhrc, .emacs) that you would like to sync between your computers, or simple keep it backed-up for minimizing the risk of loosing then? If you are using Ubuntu One it's easy to do so!
Here is the way I like to do that (If you find there's an easy way, comment it! Suggestions are welcome!)
- In your personal folder, there's a folder called "Ubuntu One". If you can't see that folder, probably you didn't setup an Ubuntu One account yet.
- Create a folder inside it to keep the files. I suggest using "dotfiles".
- Put your "dotfiles" inside that folder. I perfer to put them without the "." prefix, so I can always see them!
- Now, replace the original file with a Symbolic Link to the file inside the Ubuntu One folder. Don't forget to prefix the symlink name with "."
- You're OK now! Ubuntu One should now sync your files and the applications that uses that files will use the symlink ones, that redirects it to the Ubuntu One's folder.
- Don't forget to repeat Step #4 in other computers that syncs with your Ubuntu One's account.
So, what's the great advantage of that? Suppose you have 2 computers, one at home and one at work. You have a high-customized ".vimrc". At work, you make a lot of changes to it. Now, how to get that changes to your home ".vimrc"? You don't have to! Ubuntu One will do everything behind the scenes for you! (Note that you can do the same with your ".vim" folder, so you can keep your vim plugins in sync too).
