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


Click here to return to the 'Enable 'cd' into directory aliases from the Terminal' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Enable 'cd' into directory aliases from the Terminal
Authored by: kaltree on Sep 02, '05 12:04:50PM
I think an easy fix to this issue is to create the shotcut via the built-in shell application called ln.

Suppose I have a folder:
Users -> John -> Documents -> School Files -> Archives -> stuff

I want a shortcut in:
Users -> John -> Shortcut File

The desired behavior is to open a terminal, and cd into the link 'Shortcut File', taking me to 'stuff' without having to drill down through all the layers...

You would type the following to create this shortcut (symbolic link):

ln -s "/Users/John/Documents/School Files/Archives/stuff" "/Users/John/Shortcut File"
You can open this folder just as you would in the finder. Infact, it shows up as a regular shortcut. The main advantage here is you can also enter this directory via the shell (either local, or SSH). I guess it just makes sense to me that if you need access to the folder via the shell, why not just create the shortcut through the shell?

Seems like a defect to be submitted via RADAR though. A shortcut should have non-ambiguous behavior.

[ Reply to This | # ]
Enable 'cd' into directory aliases from the Terminal
Authored by: Anonymous on Sep 05, '05 08:47:09AM
It might be worth trying SymbolicLinker 1.1v3 by Nick Zitzmann. It works in Tiger. The only issue is that the links it creates are to absolute paths, not relative. It hasn't been updated for two years, so I don't know what its status is.

[ Reply to This | # ]
Missing the point of this hint
Authored by: klktrk on Dec 01, '06 11:00:32AM

The point of this hint is not to replace aliases with symbolic links. obviously you could just make a choice to never make aliases and always create symbolic links instead, in which case this hint would be moot.

The author is trying to address the more common scenario where you are working in the shell on a machine where aliases are already existing (likely in any Mac OS X environment where the finder is being used).

Sure you can just try to never use the alias functionality of the Finder (though it is in fact in many ways superior to symbolic links), but if you want to use aliases AND be able to navigate them in the shell, what do you do? This is the issue the hint is trying to address, and does so quite well.



[ Reply to This | # ]