Create a symbolic link in OS X
techAdmin
Status: Site Admin
Joined: 26 Sep 2003
Posts: 4128
Location: East Coast, West Coast? I know it's one of them.
Reply Quote
Needless to say, OS X has to make this weird, a classic and well known Unix method of creating symbolic links. Thanks to this Easy Symbolic Links for Mac OS X article for an easy how to.

:: Quote ::
Mac OS X comes with a built in ability to mac an “alias” to a file or folder which is different than a true symbolic link. By simply holding down the OPTION and APPLE/COMMAND keys at the same time and clicking on the file or folder, you can drag and create one.

Once you have this “alias” you can locate it anywhere you like. It is basically a pointer to the original file and for the most part acts as though it is the original file or folder. If you double click the alias, the original file or folder opens up just like you clicked the real item.


Ok, so that's sort of like a symbolic link I guess, close enough. Well, except that it's NOT ok, and it doesn't work. Another Apple decision to make things user 'friendly' that just doesn't work. However, luckily it's easy to make a real symbolic link that does work. I found this when trying to link an external music drive to the user's Music folder, inside it, so I could have just one location for all the music.

However, the author goes on to explain how to make a true symbolic link, but first, let's review, the only reason we need to use some silly app to make a simple link is because it's so damned hard to figure out the file system true paths in OS X.

Here's a hint, open Applications, Utilities, click Terminal, now, to create a simple link, let's say the external drive has the label ext750gb, and the user's name is fred
:: Code ::
ln -s /Volumes/ext750gb /users/fred/Music

And that's it, now there's a permanent real Unix symbolic link that will work whenever you have your external drive plugged in.

:: Quote ::
But since Mac OS X is unix underneath, there is another type of link that you can make that applications ARE able to follow. Its called a symbolic link.

I have used these many times. Symbolic Links create pointers to files and folders just like an alias does. But for some reason they seem to work with more applications and don’t have the limitations of the alias. But in the old days (before today!) I used to have to go to a unix shell in remember how to use the ln command. This was not all that hard, but it was kind of a pain.

Today I found Symbolic Linker (PS: Right-Click on the download link and SAVE AS otherwise you might get the data showing in your browser window) which is a nifty piece of freeware. Once you install it (make sure to read the readme instructions!) it allows you to simply right-click on a file or folder and select Make Symbolic Link down at the bottom. Then you get something that looks just like an alias, but functions a lot better.

Back to top
Display posts from previous:   

All times are GMT - 8 Hours