Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

10.4: Improved symbolic linking via Volumes folder UNIX
Tiger only hintNot sure when this creeped in, but it's good for people who like using Unix-styled symbolic links. At least in the latest version of Tiger, all volumes, including local volumes, are listed in /Volumes. The consequence of this is that, now when you log in remotely, a link pointing to say Applications can go to the correct place.

Consideer this example. Computer_A is the local computer and Computer_B is the remote computer. You create the following link:
ln -s /Applications ~/Applications
That creates a symbolic soft link from your home folder to /Applications. Everything will work as expected, as long as you are on Computer_A. If you log in from Computer_B, clicking on that link will take you to the applications folder on Computer_B, and not Computer_A as you might have expected. The solution is therefore to do the following:
ln -s /Volumes/Computer_A/Applications ~/Applications
Now, regardless of whether you are on Computer_A or Computer_B, you will be taken to the applications folder on Computer A. So many words to describe such a simple idea.

[robg adds: I believe the boot disk alias returned to the Volumes folder in 10.4; it had vanished in the 10.3 days, but was there earlier, as I recall. And to clarify one point, in the above example, Computer_A would be replaced by the name of your boot disk on that machine, not by the actual name of the machine as seen in (for instance) the Sharing panel.]
    •    
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[6,878 views]  

10.4: Improved symbolic linking via Volumes folder | 5 comments | Create New Account
Click here to return to the '10.4: Improved symbolic linking via Volumes folder' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Another clarification
Authored by: googoo on Dec 13, '05 07:30:18AM

Here is another clarification. I think that when you say "log on," you mean connect with file sharing. The first symbolic link would still work if you log on to Computer_B with a terminal connection such as ssh. This is a useful hint, though.

-Mark



[ Reply to This | # ]
And Another
Authored by: jralls on Dec 13, '05 09:55:25AM

Furthermore, it only works if the disks on the two machines have different names -- which means that the default name (Macintosh HD) must be overridden on at least one of them. Otherwise, the local system's disk is /Volumes/Macintosh HD and the remote system's is
/Volumes/Macintosh HD-1 -- so the link trick wouldn't work.



[ Reply to This | # ]
Alias it!
Authored by: murali1080 on Dec 13, '05 03:33:26PM

If you replace the symbolic link with an alias, either through GUI or through OSXUtils on the CLI, it should work even with the example cited above where one volume becomes 'Machintosh HD 1.'



[ Reply to This | # ]
Alias it!
Authored by: Bobson on Dec 26, '05 10:05:42PM

I believe that aliases can't be followed from the command line, which kindof defeats the point of worrying about symbolic links. If you never use the command line, aliases are all you need, and you don't need to worry about where your symbolic links point. If you do, then aliases don't cut it.



[ Reply to This | # ]
10.4: Improved symbolic linking via Volumes folder
Authored by: seanasy on Dec 19, '05 08:08:27AM
I believe the boot disk alias returned to the Volumes folder in 10.4; it had vanished in the 10.3 days, but was there earlier, as I recall.

I have a machine running 10.3 which has the boot drive symlinked under /Volumes. This isn't just a "10.4 only" hint. One could also create the symlink themselves if it isn't already there.

This hint should be rewritten for clarity and accuracy.



[ Reply to This | # ]