Shawn Blanc has published two interesting posts (here and here) about the process of creating symbolic links on Mac OS X, following up to Gruber’s post from last week where he wrote about his configuration of Yojimbo’s library synced and backed up with Dropbox.
I’d like to cover two neat ways of playing around with Symlinks (for a basic knowledge about the subject you can head over the Wikipedia page) which involve the terminal, and I’ve found them very useful so far.
The first terminal command allows you sync files to Dropbox from anywhere in your OS X installation, you just have to create symlinks to the folders that you want to keep synced inside Dropbox.
This an example of the command:
ln -s /Users/usernamehere/Documents/foldernamehere /Users/path/to/yourdropboxfolder/Files/
As you can guess, it comes in handy if you don’t want to sync just the files located into the Dropbox folder. I don’t know where I found this hack, thanks Yojimbo for storing it until today (yeah, I’m moving to DEVONthink).
The second one is pretty tricky, but I couldn’t live without it anymore. Basically, it creates symlinks for every item inside a folder, and I’m using it to keep my apps stored somewhere else than /Applications, still having all the features intact. As you may know, if you move applications around on your hard drive updates may fail, and 3rd party updates checkers like AppFresh and MacUpdate Desktop could encounter some errors.
With these two terminal commands:
$ cd /Applications
$ ln -s /newlocation/of/yourapps/* .
I’ve been able to move the files inside the /Applications folder on another location.
Last, I remember there was an app called “Alias to Symlink” floating around some years ago, but the developer’s website seems to be down. Feel free to share any other symlink tips you have.