bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#52115: Suggestion: LN command should swap TARGET and LINK_NAME if LI


From: Chris Elvidge
Subject: bug#52115: Suggestion: LN command should swap TARGET and LINK_NAME if LINK_NAME already exists
Date: Mon, 29 Nov 2021 09:58:50 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 Lightning/5.4



On 29/11/2021 01:07 am, Bob Proulx wrote:
Warren Parad wrote:
except mv(1) and cp(1) are both "FROM" and then "TO", but ln is backwards
from thi, it is "TO" then "FROM", the least the command could do is put
these in the correct order.

But that is not correct.  The order for ln is the same as for cp and
mv in that the target getting created is the right side argument.

(Unless the -t or -T option is used to do it differently by explicit
syntax request.  Unless no target is specified in which case dot is
assumed.  I admit those two "unless" cases complicate the original
simplicity.  But the normal case is to create the right side argument
as the target of the command.)

  it is a one-time effort to learn the order
Opinion, do you want proof that people can't learn this, because they
haven't.

The target getting created is the right side argument.  If that is not
clear from the documentation then improving the documentation is
always good.

Let me say with some confidence that if the order were changed to
create the left argument that people would be very upset that cp and
mv created the right side argument but ln created a left side
argument!

Bob





Windows mklink command already does this - yes, it's annoying.

--

Chris Elvidge








reply via email to

[Prev in Thread] Current Thread [Next in Thread]