[CentOS] Re: symbolic linking

Robert Nichols rnicholsNOSPAM at comcast.net
Mon May 19 18:55:54 UTC 2008


MHR wrote:
> Yes, using fqpn's is best in situations like this, but if I read the
> above correctly, you want:
> 
> ln -s /mnt/jack/files /opt/files
> 
> because you said you mounted jack's /opt on jill's /mnt/jack, not
> jack's / (root).
> 
> Still, why you would get /opt/files/files is a mystery to me, too.

You will get that if /opt/files is an existing directory or a symlink
to an existing directory.  The semantics of "ln -s" are that if the
target exists and is a directory, then the symlink is placed within
that directory.  That's true even when you use the "-f" flag trying
to replace an existing symlink, and I get bit by that frequently.

You just have to be very careful when symlinking directories.

-- 
Bob Nichols     "NOSPAM" is really part of my email address.
                 Do NOT delete it.




More information about the CentOS mailing list