Linking directories with the "ln" command?

simX

Unofficial Mac Genius
Is there any way to link directories without using the -s (symbolic link) option? Or must I use this option?

The reason is because I want to see if I can "move" my System, Library, and User folders to somewhere else on the hard drive.

I actually just about did it without using the "-s" command. I put everything into a "System X" folder, and then made symbolic links at the root level. The benefit of this is that I could just make the symbolic links invisible, and then my root folder won't be cluttered. :)

The only problem that happened was that carbon applications couldn't open. Cocoa applications opened just fine. So it almost worked! Damned carbon applications.

I tried linking by traditional Mac aliases (which are much different from symbolic links), but that just caused a kernel panic on startup.

So can I link directories w/o a symbolic link?


It seems that if I almost succeeded and the only thing that didn't work was carbon applications, Apple should be able to modify the system and Carbon resources somehow so that it would allow you to do this. Then you have the System "mobility" that OS 9 offered. And then you could also have multiple OS X systems on one hard drive.


Any ideas?
 
You need to use ln -s to link directories, I'm afraid. The reason, if you're curious:

Every directory has two standard entries - "." which is a reference to the current directory itself, and ".." which is a reference to the directory one higher (in the case of the root directory, /, ".." is also a reference to itself, since there is no higher to go).
If more than one directory contained a hard link to directory X, then it would be impossible to know which of those two should be meant by "X/..".
 
Ah, I see.

Ah well, my experiment comes to an end.

DARNED Carbon applications! OmniWeb worked fine, too. :(
 
Back
Top