bug#79445: `ln -s` should raise a warning about pwd-relative vs symlink-location-relative targets

Collin Funk <[email protected]>
Newsgroups gmane.comp.gnu.core-utils.bugs
Message-ID <[email protected]>
Paul Eggert <[email protected]> writes:

> On 2025-09-13 03:16, Chris wrote:
>> It seems to me it should be easy enough to alert users to this gotcha by
>> printing a warning to stderr when creating a symlink
>
> I dunno, that gotcha has been present in Unix and Linux for nearly 50
> years now, and lots of people are used to the gotcha would plausibly
> object to a warning.

FWIW, relative symbolic links and dangling symlinks are covered in the
manual. You can read it online [1], or using the following command in
your terminal:

    $ info '(coreutils) ln invocation'

I agree that it probably is a point of confusion for someones first
encountering symbolic links, but it is a perfectly valid use of them. So
I think emitting a warning there would cause some complaints.

New warnings tend to surprise people. I'm sure Paul remembers the many
long threads about the warning that 'egrep' and 'fgrep' are obsolete. :)

Collin

[1] https://www.gnu.org/software/coreutils/manual/html_node/ln-invocation.html#ln-invocation
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.