GNU bug report logs -
#79060
ln documentation 2nd form does not work
Previous Next
To reply to this bug, email your comments to 79060 AT debbugs.gnu.org.
There is no need to reopen the bug first.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-coreutils <at> gnu.org
:
bug#79060
; Package
coreutils
.
(Sun, 20 Jul 2025 14:54:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Mason Wong <masonwong1999 <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-coreutils <at> gnu.org
.
(Sun, 20 Jul 2025 14:54:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
According to the ln documentation ( ln(1) - Linux manual page
<https://man7.org/linux/man-pages/man1/ln.1.html>)
[image: image.png]
The documentation states that you should be able to do something like *ln
a.txt* (where a.txt is just some arbitrary file). However, this is
misleading because something like this cannot be done:
[image: image.png]
From experience, you *must* always give the ln command two arguments
(either a directory with the -t option or as the second argument as in the
3rd and 4th form *or *the
*link_name). *Essentially, I don't think the documentation is accurate and
that the second form does not make sense and it is misleading at best. It
would be helpful to correct this for future documentation man pages to not
have this ambiguity.
Best wishes,
Mason
[Message part 2 (text/html, inline)]
[image.png (image/png, inline)]
[image.png (image/png, inline)]
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#79060
; Package
coreutils
.
(Sun, 20 Jul 2025 15:08:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 79060 <at> debbugs.gnu.org (full text, mbox):
Hello Mason,
as the manual says "In the 2nd form, create a link to TARGET in the current directory.":
mkdir x
touch y
cd x
ln ../y
Works!
Best regards,
Martin
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#79060
; Package
coreutils
.
(Sun, 20 Jul 2025 15:20:02 GMT)
Full text and
rfc822 format available.
Message #11 received at submit <at> debbugs.gnu.org (full text, mbox):
On Sun, 20 Jul 2025 23:21:09 +1000, Mason Wong <masonwong1999 <at> gmail.com>
wrote:
> According to the ln documentation ( ln(1) - Linux manual page
> <https://man7.org/linux/man-pages/man1/ln.1.html>)
>
> [image: image.png]
> The documentation states that you should be able to do something like *ln
> a.txt* (where a.txt is just some arbitrary file). However, this is
> misleading because something like this cannot be done:
The problem is that you're running the command in the same directory as the
source, so it correctly cannot create a link to it since an object with the
same name already exists (ie, the file itself). This is the same that would
happen even with the two-argument form of ln, if an object with the same
name already exists;
$ touch b
$ ln -s /bin/ls b
ln: failed to create symbolic link 'b': File exists
Try linking to an object that doesn't live in the same directory.
$ rm b
$ ln -s /bin/ls
$ ls -l
lrwxrwxrwx 1 davide davide 7 Jul 20 17:18 ls -> /bin/ls
--
D.
Added tag(s) notabug.
Request was from
Paul Eggert <eggert <at> cs.ucla.edu>
to
control <at> debbugs.gnu.org
.
(Sun, 20 Jul 2025 23:14:01 GMT)
Full text and
rfc822 format available.
bug closed, send any further explanations to
79060 <at> debbugs.gnu.org and Mason Wong <masonwong1999 <at> gmail.com>
Request was from
Paul Eggert <eggert <at> cs.ucla.edu>
to
control <at> debbugs.gnu.org
.
(Sun, 20 Jul 2025 23:14:02 GMT)
Full text and
rfc822 format available.
This bug report was last modified 27 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.