TARGET = the real file you want the symbolic link to point to
DIRECTORY = the path (and optionally the name) of the symbolic link itself
As an example:
ln -s /home/someuser/docs/something_important.txt /home/user2
That would create a symbolic link in /home/user2. The real file is /home/someuser/docs/something_important.txt. In this case, the symbolic link's name will also be something_important.txt
One more example:
ln -s /home/someuser/docs/something_important.txt /home/user2/something_stupid.txt
The real file remains the same, the directory the symbolic link is in remains the same, but the symbolic link's name is now something_stupid.txt.
Also, I'm using absolute paths to the real file. That's generally considered bad (because it's not very portable). They will work though. You could use relative paths instead, like:
ln -s ../someuser/docs/something.txt /home/user2/something_stupid.txt
In that command, the target is relative to the location of the link itself. In other words, it's saying, start in /home/user2, create a link named something_stupid.txt, have it point to a file one directory up (/home) & in subdirectory someuser/docs named something_important.txt. Using this method, you can move directories and the symbolic links won't break. If I confused you with that last one, just ignore it. You'll catch on soon enough.
Last edited by Dark_Helmet; 01-14-2005 at 09:15 PM.