Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

g-boac

macrumors 6502
Original poster
Oct 7, 2007
291
1
Hi - can somebody explain to me the difference between symbolic links and aliases? Especially any pros/cons of each, and under what circumstances I would want to use one over the other (and vice versa)?

I know that Mac OS X by default creates an alias when you hold down the command-option keys while dragging a file. . .but beyond that, I don't know why or the difference between the two. Any insights, and examples why/when you use one (or WOULDN'T use one) vs. the other help!!

thanks!!
Mark
 
Well a symbolic link is a filesystem function Alias is more of a special kind of file.

-s links are one way street point to a location regardless of what is there or if that changes. If you rename the destnation folder it points to nothing. If rename some other folder to the right name it now points there. A symlink in terminal will be understood just like a hard link.
Uses the icon of the original folder, file ..

Alias is a two way stree it points to the file not its location like a hard link.
You move the file (on the same partition) the alias won't break.
Alias can use its own icon. Alias doesn't work in the command line.

There are also hard links which are effectivly true addresses. The hard link "is" the file, just that there can be multiple hard links from different locations point at the same file. As long as one hardlink lives the file is not deleted.
It is basically a way to break the usual folder structure.

For the Movies, Music .. folders I would just use symbolic links. I never really tried what happens to a hard link if it points to a drive that isn't mounted currently.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.