Traversing the Command Line


Frantic Messenger of Hope
Hi all,

I've pretty much got the basics of the CLI down, but there's one thing that's killing me: how to follow links through the CLI.

The way I have my box set up, intead of each user having their own Pictures and Music folders, I have them all set up as links to specific folders on a separate partition (to keep clutter and disk traffic off my OS disks basically). Now, lets say I'm trying to get through the file system by way of an SSH session ... how would I go about cd'ing to a location by a link instead of having to cd /volumes ... etc.?

Any help would be great :) Also, one other quickie – Has anyone figured out a way for all users to be able to see a separate shared HD partition instead of just the Home folders of each User when connecting remotely?



you can make a symbolic link to the hard drive:

ln -s source target

If that doesn't work then it is

ln -s target source

But i'm fairly sure the first one is right.



Licensed Computer Geek
As far as links go, any decent OS should let you cd to them as though they were just a plain old directory. In fact, some of the directories like /etc and /var are really just symlinks to directories in /private. If creating an alias through the Finder doesn't create a proper symlink, just read the man page for ln and make it with that. It should work just fine.


Notorious Olive Counter
Finder aliases are not actually symlinks. "file" reports them as just empty files - I have no idea what they are. The finder reports, and treats, symlinks as aliases though.