"ln" sees this as "create a symlink in /usr/doc/mypkg/".
Yes; and that was the intent. The part that came out wrong is that, instead of:
"create a symlink at /usr/doc/mypkg/manual.html that points to /usr/local/pkgs/mypkg/manual.html "
"create a symlink at /usr/doc/mypkg/manual.html that points to /usr/doc/mypkg/manual.html"
The question is, "why?" The form of the ln command (according to the man page) is:
So the command that I am trying to construct, using absolute paths, is:
ln -s /usr/local/pkgs/mypkg/manual.html /usr/doc/mypkg/manual.html
I should be able to issue that command from anywhere
and get the correct result.
If my current working directory is /usr/local/pkgs/, I should be able to omit that part from either the 'src' or 'dest' part. So (since that is where I was), I should be able to abbreviate the above to:
ln -s manual.html /usr/doc/mypkg/manual.html
But that is not how the command was interpreted. (I also omitted the filename in the [dest] part, but I think the above is enough to illustrate my question.)
I am trying to understand why. Is it because:
-- I am not understanding how relative paths work under *nix/Linux/slackware
-- ln treats relative paths in an unusual but correct way
-- the fact that I omitted the filename in the 'dest' part changes something (what?)
-- there is a bug in ln
or some other reason?