[Courses] [FS] Filesystem Course lesson 2

Sue Stones suzo at bigpond.net.au
Wed Jul 16 23:14:33 EST 2003


Thanks Meredydd, 
A couple of questions/comments arise for me from this lesson.

I notice that you refer to direcotries with an ending slash 
eg web/  ../   ./
Whereas I think of directories as files ("everything in Unix is a file"), 
hence the above directorys are
 web   ..    .

What is the diference? 



Secondly I find this statemet to be unclear, I read it and look for an 
explanation.  It is a general statement about symbolic links.

>One more important point, and one you should never forget: Symbolic links are 
>relative!.


What you provided was an example which helps only a little  (see below)


>ln -s web/ backups/

>...it would have created the link, but then failed horribly (with a "file not 
>found" error) when I tried to follow it. The reason? The path "web/" would 
>have been evaluated relative to the directory where the link is 
>(/home/meredydd/backups/), not the directory we were in when we created the 
>link (/home/meredydd/).


In this example we see that when a symbolic link is created the "function" (I 
don't know what the correct designation here should be) ln interprets the 
pathname of the actual file/directory  relative to the directory which is to 
contain the symbolic link.

This is a spicific statement about ln which is used to *create symbolic 
links*.  (to my mind this is quite different to the link itself).

So my question is, is the example the sum total of the way in which "Symbolic 
links are relative!."  or is there more to it.   If it is the latter could 
you please explain some more, and give more examples.

thanks
sue





More information about the Courses mailing list