[CentOS] symbolic linking

Mon May 19 17:43:57 UTC 2008
MHR <mhullrich at gmail.com>

On Mon, May 19, 2008 at 7:40 AM, Bowie Bailey <Bowie_Bailey at buc.com> wrote:
> Frank Cox wrote:
>> I have a number directories under /opt on computer jack.  I want some
>> (not all) of them to appear in /opt on computer jill.
>>
>> I have the /opt directory on jack mounted on jill under /mnt/jack
>>

I'm not clear on what this means - jill:/mnt/jack == jack:/opt?

>> If I go into the /opt directory on jill and do this:
>>
>> ln -s /mnt/jack/opt/files .
>>

If the above (of mine) is correct, then you have:

jill:/mnt/jack/opt/files == jack:/opt/opt/files - this also makes no sense.

>> I get /opt/files/files on jill.  What I want is /opt/files and I
>> can't see what I'm doing wrong.
>
> I don't see anything wrong with that command.  A quick test on one of my
> systems confirms that it should do what you expect.
>
> Try specifying the target explicitly:
>
>        ln -s /mnt/jack/opt/files /opt/files
>
> (no trailing slashes on either the source or destination)
>

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.

HTH.

mhr