GNU bug report logs - #52115
Suggestion: LN command should swap TARGET and LINK_NAME if LINK_NAME already exists

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: coreutils; Severity: wishlist; Reported by: Warren Parad <wparad@HIDDEN>; Keywords: wontfix; dated Thu, 25 Nov 2021 20:25:02 UTC; Maintainer for coreutils is bug-coreutils@HIDDEN.

Message received at 52115 <at> debbugs.gnu.org:


Received: (at 52115) by debbugs.gnu.org; 29 Nov 2021 20:01:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 29 15:01:45 2021
Received: from localhost ([127.0.0.1]:39536 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mrmqP-0006N7-Ak
	for submit <at> debbugs.gnu.org; Mon, 29 Nov 2021 15:01:45 -0500
Received: from mail-wr1-f41.google.com ([209.85.221.41]:40905)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <celvidge001@HIDDEN>) id 1mrmqN-0006Mu-5d
 for 52115 <at> debbugs.gnu.org; Mon, 29 Nov 2021 15:01:43 -0500
Received: by mail-wr1-f41.google.com with SMTP id t9so22367694wrx.7
 for <52115 <at> debbugs.gnu.org>; Mon, 29 Nov 2021 12:01:43 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=subject:to:cc:references:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-language:content-transfer-encoding;
 bh=rcGO9eEdMBktbeyMEgyyaFoHlu329mqCEsAr8PyCl2M=;
 b=LtiUYjS5Ba+dgjwKj4siP2PWRX9kKqvP7lCTJNQI4gSPfUqa6VTwTz9apVb3brAxo1
 NrRM3etulqFP15VW0SqvcjeJ0Xl8LH5fZa90j6ckTZ5JJWZKuNF3+bAi9JRP+LrP7Ldp
 huZqnFq8uoWN4TzaMt2U0b7yswlZiS63MZ5D/EjrRcrdVYsWefc6Yd5ewwBT2EmmIX89
 JBBx+Bet5owgtPuSG3ewBR/QtghmxxAhl1qn7OkEI+MDegZEEGSo9vePfaFvx4/WOuTm
 wzu0t1PN9ha21ILFGa1OmTPDEuQ4phrWhOaYwI8dRF86yhqEOhvGG2Szc2dx/p/m+BKs
 RW8w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:subject:to:cc:references:from:message-id:date
 :user-agent:mime-version:in-reply-to:content-language
 :content-transfer-encoding;
 bh=rcGO9eEdMBktbeyMEgyyaFoHlu329mqCEsAr8PyCl2M=;
 b=mG/Azy0Tp6zW1lfN5qTpKrTMOJDO9Eq9fjo+d8JukHlAK8uP2RH3NQKPPS+iAOGbYO
 4lzLardZG/CAkcYZSsuEE8Eq/+ds/qLS8rgyabTrN6TvZqmSuhjZdNiBPbxJBwR6551L
 eEu3Osf7ekSp2CNT/bmNw1dS4G1f+bhQHxtNXRol3q4JNX3EVKyGaevahnDZsrVnwQex
 RTW1DLfh9cA0Usrwta1btzHKeUFoIZYkg3F8Ajylr/ls0vkS1jk17EzzgKuokxuvbdwQ
 t9qtKMWJPZtm5T54YvVR2b82ewdrZbrvZpJshyS5K/JzyzROx5BLKbscAIGpWJ2xlS1+
 PClg==
X-Gm-Message-State: AOAM530elx/x/xanxPjwwjHuYdH2zUnm/RZ6aJsaUwxBJ0QgqtGDipuq
 auBCOWRkAH5rjpqNbEjsbhjpo8sgSqI8gr2d
X-Google-Smtp-Source: ABdhPJwS/yhufqOLs8wvoNNUjcrKAseYNbIOUNwWVHt4MortEvFQYd13N16YF2PED2XR4onCeYFbhA==
X-Received: by 2002:a5d:43d0:: with SMTP id v16mr36835073wrr.58.1638216097213; 
 Mon, 29 Nov 2021 12:01:37 -0800 (PST)
Received: from [192.168.23.100] (92.40.203.182.threembb.co.uk. [92.40.203.182])
 by smtp.gmail.com with ESMTPSA id r83sm258767wma.22.2021.11.29.12.01.35
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Mon, 29 Nov 2021 12:01:36 -0800 (PST)
Subject: Re: bug#52115: Suggestion: LN command should swap TARGET and
 LINK_NAME if LINK_NAME already exists
To: Paul Eggert <eggert@HIDDEN>, Ulf Zibis <Ulf.Zibis@HIDDEN>
References: <CAB57QDm6P1yKL_yQmo8WW91oM4GOumS6ypNfqL_HS2n0b9QBnQ@HIDDEN>
 <333ee954-2643-1a6d-38fd-2f589864ca58@HIDDEN>
 <CAB57QDmVJ9H3ek4FASO1Z-qcVb19qn=PBDr_Y+Z=ZrtjWtz_1A@HIDDEN>
 <82e05201-e25e-716a-3b55-65130b6a9d56@HIDDEN>
 <673973f1-3e42-9952-de40-e3303be6704e@HIDDEN>
 <a498c726-13f9-3a76-5f1d-ac8a453dc8eb@HIDDEN>
From: Chris Elvidge <celvidge001@HIDDEN>
Message-ID: <7b5dd738-475d-3d46-fd25-43738074373d@HIDDEN>
Date: Mon, 29 Nov 2021 20:01:33 +0000
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
 Thunderbird/52.2.1 Lightning/5.4
MIME-Version: 1.0
In-Reply-To: <a498c726-13f9-3a76-5f1d-ac8a453dc8eb@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-GB
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.2 (/)
X-Debbugs-Envelope-To: 52115
Cc: 52115 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.8 (/)

On 29/11/2021 07:07 pm, Paul Eggert wrote:
> On 11/29/21 02:34, Ulf Zibis wrote:
>> I think, for beginners it would be less confusing, if the most simple 
>> form would be the first.
> 
> Unfortunately the simple form "ln TARGET" is quite rarely used, so 
> putting it first is likely to confuse beginners even more than what we 
> have already. Come to think of it, perhaps we should put the simple form 
> last instead of 2nd.
> 

I use 'ln -s "source"' quite a lot for linking into e.g. /usr/local/bin 
from my own $HOME/bin.

The real problem could be with the terminology.
'ln [options] TARGET [LINK_NAME]'; the TARGET is really the source, 
which obviously must exist. A TARGET is really something you aim at.

Perhaps it should be changed to 'ln [options] source [link]'


-- 

Chris Elvidge






Information forwarded to bug-coreutils@HIDDEN:
bug#52115; Package coreutils. Full text available.

Message received at 52115 <at> debbugs.gnu.org:


Received: (at 52115) by debbugs.gnu.org; 29 Nov 2021 19:08:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 29 14:08:05 2021
Received: from localhost ([127.0.0.1]:39404 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mrm0T-0000Uf-3h
	for submit <at> debbugs.gnu.org; Mon, 29 Nov 2021 14:08:05 -0500
Received: from zimbra.cs.ucla.edu ([131.179.128.68]:50442)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eggert@HIDDEN>) id 1mrm0R-0000U4-0B
 for 52115 <at> debbugs.gnu.org; Mon, 29 Nov 2021 14:08:04 -0500
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id E042C160102;
 Mon, 29 Nov 2021 11:07:56 -0800 (PST)
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032)
 with ESMTP id C5mxGakivgQv; Mon, 29 Nov 2021 11:07:56 -0800 (PST)
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id 469B01600EF;
 Mon, 29 Nov 2021 11:07:56 -0800 (PST)
X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026)
 with ESMTP id 3DFr1disP-Uc; Mon, 29 Nov 2021 11:07:56 -0800 (PST)
Received: from [131.179.64.200] (Penguin.CS.UCLA.EDU [131.179.64.200])
 by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 2D624160097;
 Mon, 29 Nov 2021 11:07:56 -0800 (PST)
Message-ID: <a498c726-13f9-3a76-5f1d-ac8a453dc8eb@HIDDEN>
Date: Mon, 29 Nov 2021 11:07:55 -0800
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
 Thunderbird/91.3.0
Subject: Re: bug#52115: Suggestion: LN command should swap TARGET and
 LINK_NAME if LINK_NAME already exists
Content-Language: en-US
To: Ulf Zibis <Ulf.Zibis@HIDDEN>
References: <CAB57QDm6P1yKL_yQmo8WW91oM4GOumS6ypNfqL_HS2n0b9QBnQ@HIDDEN>
 <333ee954-2643-1a6d-38fd-2f589864ca58@HIDDEN>
 <CAB57QDmVJ9H3ek4FASO1Z-qcVb19qn=PBDr_Y+Z=ZrtjWtz_1A@HIDDEN>
 <82e05201-e25e-716a-3b55-65130b6a9d56@HIDDEN>
 <673973f1-3e42-9952-de40-e3303be6704e@HIDDEN>
From: Paul Eggert <eggert@HIDDEN>
Organization: UCLA Computer Science Department
In-Reply-To: <673973f1-3e42-9952-de40-e3303be6704e@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -2.4 (--)
X-Debbugs-Envelope-To: 52115
Cc: 52115 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.4 (---)

On 11/29/21 02:34, Ulf Zibis wrote:
> I think, for beginners it would be less confusing, if the most simple 
> form would be the first.

Unfortunately the simple form "ln TARGET" is quite rarely used, so 
putting it first is likely to confuse beginners even more than what we 
have already. Come to think of it, perhaps we should put the simple form 
last instead of 2nd.




Information forwarded to bug-coreutils@HIDDEN:
bug#52115; Package coreutils. Full text available.

Message received at 52115 <at> debbugs.gnu.org:


Received: (at 52115) by debbugs.gnu.org; 29 Nov 2021 10:34:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 29 05:34:42 2021
Received: from localhost ([127.0.0.1]:37185 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mrdzd-00040q-Pl
	for submit <at> debbugs.gnu.org; Mon, 29 Nov 2021 05:34:42 -0500
Received: from mout.gmx.net ([212.227.15.15]:50145)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <Ulf.Zibis@HIDDEN>) id 1mrdzc-00040c-Ea
 for 52115 <at> debbugs.gnu.org; Mon, 29 Nov 2021 05:34:41 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
 s=badeba3b8450; t=1638182074;
 bh=SQ/IM+MyK+d6rOq2TXqfL7fi13+3Q4OfpODkKGO/6KA=;
 h=X-UI-Sender-Class:Subject:To:References:From:Date:In-Reply-To;
 b=AkOE1KTdl9I/kPFc392j7X95c2wl7xEB7C5vfcPQL9tGCmisdmBeHL345QREYg3M8
 eCinc8QHHcm7rrj7UbRFA1X9x7VSQE8qrXfv4YhdHAuBQw+Zid91E+8cNlXJksrF/n
 IPOjaxhT5qqbFmDYdd/Lw2P2WPosRVznzkYaUoI8=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from [192.168.178.20] ([94.220.133.191]) by mail.gmx.net (mrgmx005
 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MSKyI-1n2fYH47lA-00Sema for
 <52115 <at> debbugs.gnu.org>; Mon, 29 Nov 2021 11:34:34 +0100
Subject: Re: bug#52115: Suggestion: LN command should swap TARGET and
 LINK_NAME if LINK_NAME already exists
To: 52115 <at> debbugs.gnu.org
References: <CAB57QDm6P1yKL_yQmo8WW91oM4GOumS6ypNfqL_HS2n0b9QBnQ@HIDDEN>
 <333ee954-2643-1a6d-38fd-2f589864ca58@HIDDEN>
 <CAB57QDmVJ9H3ek4FASO1Z-qcVb19qn=PBDr_Y+Z=ZrtjWtz_1A@HIDDEN>
 <82e05201-e25e-716a-3b55-65130b6a9d56@HIDDEN>
From: Ulf Zibis <Ulf.Zibis@HIDDEN>
Message-ID: <673973f1-3e42-9952-de40-e3303be6704e@HIDDEN>
Date: Mon, 29 Nov 2021 11:34:33 +0100
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
 Thunderbird/78.14.0
MIME-Version: 1.0
In-Reply-To: <82e05201-e25e-716a-3b55-65130b6a9d56@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: quoted-printable
Content-Language: en-GB
X-Provags-ID: V03:K1:9VNQubzpVq/jUSvMwmvrQJXEZyGyewXHtcDPe2gluEY8KK/n2q2
 ORHxGaBFzhFgqVngRBQVHepiNyXp0LSHUU86NJQTOgvlSfgoCf8xhu2ZSu7phrk3j5qg7N9
 5P18tlX1HQtG9XcXLxrFY1h/ouMJJmK5DRS8efpPhe4LbfepUIlk1leW4khUbVMDU42Ya2d
 y5mRPnfTaYqKl63A6+SfA==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:AKVsqRZFtBQ=:tJ3krA18Qzvczs5SN+rVbZ
 XbMUG4PCJOjbywOgwa6PZuFYBAFzc3uFqiXDBWFqfVVtB0vWsI/Dz66fdFJcqeLePQIqRC6H1
 prEyvcw6PNbdhCoQZemueYn/lTn/GkMxulN7J7qzr9XwXbM715CJA8dQJEVWBZQ5eOuSOI0sr
 aHskBvgSktXEnUHfqwNRxB9Qkr0uPlKDMSEdb3zT4O7i7J6JYYLkA64qa9fqcvKZL8hXFflyE
 TZlkppJItSnoddy9Bb3BkKJU7PuZ2G3ORJ2I89LvFLdCo6e7Dek5Ft3lRDz0nS7A16rJjUbkf
 EIt6hRbiXHDnnuh3jl4C+ruCzpI3oJ+K7RYnqoAHD8/vpshxqgvCyv3bx0YXjc3PsiXx7BOtR
 /XBSNamj+W/LugwB1lR3Qq+95BOEcvLDlb/3Y/lNPV0fRWxBvssEY3+mYglXVypbfz/CXB/I6
 rkGLtlwK44a4ui7mVjOrgk0qrv/InL+RXlgfWL3e6EWQCPytRfVqcZkLrVzHIPPtraakLMYzW
 7izUoKwbS+lFzYD+Z3dSyeyvnQ1x7zLTAB1WRyvll4GbbgI90H+9OjWAyIZqtcIHzEBH5PVDR
 UmUayeEJjUtcj7oSbTv7AURniFP3CiQwvu6nhz+4ILRyd0yypZ2d1Q8I0VeGAhDKRKkuQE6zv
 qhJUpPsfy22uLc0wIysBgepj420VQFzfJvxYunoLtHci0kGhYEbnnrwWm4kOOoGzmDrf+R5bK
 vdx5okd93kLTS6zQlU63p9O4JSwaLJPo3AOMA5gcVflpoh/M2TQnbOAmpCSdkkRLMoWLF44Z1
 ynqg526CKEiVrfIG3Lg9QReDGyku8O9zB6XztNFR7zB0yJb1phG53yA93W1bOhKJWeHNNxnZx
 nFLN43ENhd1lZffHvwXLvlZg8TklRdAoD35cpdLRumWTd3tLQrIxjuxPxH5Xv/qnQkHlod0sJ
 rifTWDzlTV90ZQyJKJf9X51Ky2DJaTgJLoI0v1ZzeJ+Jeqm+3nXEW3zVzXCWa/VPZYiwHpbRP
 K2vD0Cj4rKdjsFrIKuBjh2/KAQ6DieINdLM80kQMxGpmLDvPuMQc9JKXrONGkoXPQcO76K6DZ
 LCBtJxkPoDMKyo=
X-Spam-Score: -0.8 (/)
X-Debbugs-Envelope-To: 52115
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.8 (-)


Am 27.11.21 um 09:41 schrieb Paul Eggert:
> On 11/25/21 15:10, Warren Parad wrote:
>> except mv(1) and cp(1) are both "FROM" and then "TO", but ln is backwar=
ds
>> from thi, it is "TO" then "FROM"
>
> No, ln is exactly like mv and cp here: the source is the first argument,=
 and the destination is the second.
The problem is the possible confusion between "target" as result of the co=
mmand and as link target.

> If this isn't clear, perhaps we should make the documentation clearer; b=
ut we shouldn't change ln's behavior, as many people and programs rely on =
the current behavior, and the current behavior is more logical once you un=
derstand how file systems work.
Agreed.
I would like to change the order of the forms from:
Usage: ln [OPTION]... [-T] TARGET LINK_NAME
 =C2=A0 or:=C2=A0 ln [OPTION]... TARGET
 =C2=A0 or:=C2=A0 ln [OPTION]... TARGET... DIRECTORY
 =C2=A0 or:=C2=A0 ln [OPTION]... -t DIRECTORY TARGET...
In the 1st form, create a link to TARGET with the name LINK_NAME.
In the 2nd form, create a link to TARGET in the current directory.
In the 3rd and 4th forms, create links to each TARGET in DIRECTORY.
Create hard links by default, symbolic links with --symbolic.
By default, each destination (name of new link) should not already exist.
When creating hard links, each TARGET must exist.=C2=A0 Symbolic links
can hold arbitrary text; if later resolved, a relative link is
interpreted in relation to its parent directory.
to:
Usage: ln [OPTION]... TARGET
 =C2=A0 or:=C2=A0 ln [OPTION]... [-T] TARGET LINK_NAME
 =C2=A0 or:=C2=A0 ln [OPTION]... TARGET... DIRECTORY
 =C2=A0 or:=C2=A0 ln [OPTION]... -t DIRECTORY TARGET...
1st form: Create a link to TARGET with same name in the current directory.
2nd form: Create a link to TARGET with the name LINK_NAME.
3rd and 4th forms: Create links to each TARGET in DIRECTORY.
Create hard links by default, symbolic links with --symbolic.
By default, each destination (name of new link) should not already exist.
When creating hard links, each TARGET must exist.=C2=A0 Symbolic links
can hold arbitrary text; if later resolved, a relative link is
interpreted in relation to its parent directory.

I think, for beginners it would be less confusing, if the most simple form=
 would be the first.

Additionally we could add "with the same name" in the than 1st form.

Additionally we could shorten "In the 1st form," to "1st form:".

Also for me the existence of the 3rd for is the most confusing, as it enfo=
rces the perplexing -T option.

-Ulf





Information forwarded to bug-coreutils@HIDDEN:
bug#52115; Package coreutils. Full text available.

Message received at 52115 <at> debbugs.gnu.org:


Received: (at 52115) by debbugs.gnu.org; 29 Nov 2021 09:59:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 29 04:59:01 2021
Received: from localhost ([127.0.0.1]:37092 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mrdR7-0002xX-C6
	for submit <at> debbugs.gnu.org; Mon, 29 Nov 2021 04:59:01 -0500
Received: from mail-wm1-f43.google.com ([209.85.128.43]:37574)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <celvidge001@HIDDEN>) id 1mrdR5-0002xE-U6
 for 52115 <at> debbugs.gnu.org; Mon, 29 Nov 2021 04:59:00 -0500
Received: by mail-wm1-f43.google.com with SMTP id
 k37-20020a05600c1ca500b00330cb84834fso16313201wms.2
 for <52115 <at> debbugs.gnu.org>; Mon, 29 Nov 2021 01:58:59 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=subject:to:cc:references:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-language:content-transfer-encoding;
 bh=Yj/eEJIJVFSsJ1C8X0wYRdwO4jtrGzJrJXGfpodygsk=;
 b=cOJceYEVrTdxn9mQ1TZvs4wf4j5Mr+qJ+13K+PZeIrkrBC9qVQfaxQVR5P/OP4Pb7r
 q2DSaawGj3XpZ94ljjwHQ3TYMG+b/7TML5x+akqAogEob+gg/MmamV65RUhby4u+1Zou
 vFmdm2CgmQjfvGujldXPDPg/UTRi9JwxitfHxN6WT/MH9Q0IdVxUoHqnZXwi7pq616+X
 ID//8Nw/CFWuJ7xb3mn18akHRmB+xHx+bmDs2Mc8YpgdTk39N1W35QSEzpTqGrfPu4j8
 nQ77/ayRLWL2pXEyqeTpD1+k7gXJjPmdoHCbRLcJZPVINBWgBjaJdRha6xmbW/dBNjfT
 Nv8Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:subject:to:cc:references:from:message-id:date
 :user-agent:mime-version:in-reply-to:content-language
 :content-transfer-encoding;
 bh=Yj/eEJIJVFSsJ1C8X0wYRdwO4jtrGzJrJXGfpodygsk=;
 b=0Ps0XRsUosG8d6K0rUTDeVZXsYm+52EBVyNbxE0mNkrsDUD3zJMO+HkV6VlALWcI6Y
 DmI9pazMHAsD0MpOhFHPVTMIcZL3hg7V04hxjakPTnOM8/Aa1Xc7V68qvBIV8nmlLnzl
 YtxnJy6yVvCW8JEsUd69/9KBI/my3mdUj1Ea3Q1+ktSNGB+9lV4DipFivU2Y/I0HFKOl
 /kSCVXhd0O/x2oWheTdlztBF/TUAUGPF7A3YSFBBjAPmyPi/ixCG7pcjOqv0cFq4gDBg
 VZm5rlOGeOz92CLGIGyKRLE+VKAr0as4tRXEgSx3I6XBOk39AzbjhCaV7v4euky/A2m9
 EiRQ==
X-Gm-Message-State: AOAM530jP1w779fyeAzO+3LqXWtKmHJ4+iTG+VAkLCaDs3Iz5rlPNzk/
 7AmJ/iu4c0f3KlrgXkJXtEGk73zwTpIUi2A6
X-Google-Smtp-Source: ABdhPJyk3H0wSnlNLPnAFtgNnmqHL3HSZQ64amU7qu6KDv6Eoqosu0I17Ysdmf8wtEt9XqDRMLfVQQ==
X-Received: by 2002:a1c:2047:: with SMTP id g68mr36133188wmg.181.1638179933765; 
 Mon, 29 Nov 2021 01:58:53 -0800 (PST)
Received: from [192.168.23.100] (92.40.203.182.threembb.co.uk. [92.40.203.182])
 by smtp.gmail.com with ESMTPSA id d6sm13242012wrx.60.2021.11.29.01.58.52
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Mon, 29 Nov 2021 01:58:53 -0800 (PST)
Subject: Re: bug#52115: Suggestion: LN command should swap TARGET and
 LINK_NAME if LINK_NAME already exists
To: Bob Proulx <bob@HIDDEN>, Warren Parad <wparad@HIDDEN>
References: <CAB57QDm6P1yKL_yQmo8WW91oM4GOumS6ypNfqL_HS2n0b9QBnQ@HIDDEN>
 <333ee954-2643-1a6d-38fd-2f589864ca58@HIDDEN>
 <CAB57QDmVJ9H3ek4FASO1Z-qcVb19qn=PBDr_Y+Z=ZrtjWtz_1A@HIDDEN>
 <20211128175220053309461@HIDDEN>
From: Chris Elvidge <celvidge001@HIDDEN>
Message-ID: <5867bfb4-2833-8738-0973-e63b3e2f0f93@HIDDEN>
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
MIME-Version: 1.0
In-Reply-To: <20211128175220053309461@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-GB
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.2 (/)
X-Debbugs-Envelope-To: 52115
Cc: 52115 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.8 (/)



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







Information forwarded to bug-coreutils@HIDDEN:
bug#52115; Package coreutils. Full text available.

Message received at 52115 <at> debbugs.gnu.org:


Received: (at 52115) by debbugs.gnu.org; 29 Nov 2021 01:07:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 28 20:07:14 2021
Received: from localhost ([127.0.0.1]:36565 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mrV8T-0001r6-Sw
	for submit <at> debbugs.gnu.org; Sun, 28 Nov 2021 20:07:14 -0500
Received: from havoc.proulx.com ([96.88.95.61]:36916)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <bob@HIDDEN>) id 1mrV8P-0001qq-3t
 for 52115 <at> debbugs.gnu.org; Sun, 28 Nov 2021 20:07:13 -0500
Received: from joseki.proulx.com (localhost [127.0.0.1])
 by havoc.proulx.com (Postfix) with ESMTP id 637DB505;
 Sun, 28 Nov 2021 18:07:03 -0700 (MST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proulx.com;
 s=dkim2048; t=1638148023;
 bh=4J8hjK5tdeTEppvWGt2qF9N0srNrztRD53iTpg1hwXs=;
 h=Date:From:To:Cc:Subject:References:In-Reply-To:From;
 b=Esb0XnFm7e944xAMUnVGFTjHThp6/4SX1nFQpiYZVqFS6ckYaZMwRMBUxqwzYmYfm
 hSEoQdZESJ1Xf74YRfSQnXr+u/IMLNU/UCXpJQaOmiWK5DA7RVROY6xqFEDKNacoHU
 XZuFLdHs3JbBUsBBJgnGhI+raLWXYSIm/ut5KoZ5Vv4dWGs7O9ebp+6Te0Da4jUWI5
 XhVgveYmnljcL3KnnPSO0lnublTj+OnbVRJc99u++HHEApJdJi5oMtT4c4w+E2Ggbw
 5g2sPdvqFV6Zo2HqTvGDnI3V7+iV4eUzHRFn20KV+kFKcvZY7xUAavVEkcxOk7mI22
 pyZSMMgvApP1g==
Received: from hysteria.proulx.com (hysteria.proulx.com [192.168.230.119])
 by joseki.proulx.com (Postfix) with ESMTP id 35A3D7A007;
 Sun, 28 Nov 2021 18:07:03 -0700 (MST)
Received: by hysteria.proulx.com (Postfix, from userid 1000)
 id 1C1C42DCA1; Sun, 28 Nov 2021 18:07:02 -0700 (MST)
Date: Sun, 28 Nov 2021 18:07:02 -0700
From: Bob Proulx <bob@HIDDEN>
To: Warren Parad <wparad@HIDDEN>
Subject: Re: bug#52115: Suggestion: LN command should swap TARGET and
 LINK_NAME if LINK_NAME already exists
Message-ID: <20211128175220053309461@HIDDEN>
References: <CAB57QDm6P1yKL_yQmo8WW91oM4GOumS6ypNfqL_HS2n0b9QBnQ@HIDDEN>
 <333ee954-2643-1a6d-38fd-2f589864ca58@HIDDEN>
 <CAB57QDmVJ9H3ek4FASO1Z-qcVb19qn=PBDr_Y+Z=ZrtjWtz_1A@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <CAB57QDmVJ9H3ek4FASO1Z-qcVb19qn=PBDr_Y+Z=ZrtjWtz_1A@HIDDEN>
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 52115
Cc: 52115 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

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




Information forwarded to bug-coreutils@HIDDEN:
bug#52115; Package coreutils. Full text available.
Severity set to 'wishlist' from 'normal' Request was from Paul Eggert <eggert@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Removed tag(s) notabug. Request was from Paul Eggert <eggert@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Added tag(s) wontfix and notabug. Request was from Paul Eggert <eggert@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 52115 <at> debbugs.gnu.org:


Received: (at 52115) by debbugs.gnu.org; 27 Nov 2021 08:41:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Nov 27 03:41:17 2021
Received: from localhost ([127.0.0.1]:32875 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mqtGn-0006Q8-43
	for submit <at> debbugs.gnu.org; Sat, 27 Nov 2021 03:41:17 -0500
Received: from zimbra.cs.ucla.edu ([131.179.128.68]:55306)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eggert@HIDDEN>) id 1mqtGl-0006Pj-5T
 for 52115 <at> debbugs.gnu.org; Sat, 27 Nov 2021 03:41:16 -0500
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id D0CB9160083;
 Sat, 27 Nov 2021 00:41:08 -0800 (PST)
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032)
 with ESMTP id VDCfCFWOvppw; Sat, 27 Nov 2021 00:41:08 -0800 (PST)
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id 2CD74160103;
 Sat, 27 Nov 2021 00:41:08 -0800 (PST)
X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026)
 with ESMTP id srqlRV5KKdMu; Sat, 27 Nov 2021 00:41:08 -0800 (PST)
Received: from [192.168.1.9] (cpe-172-91-119-151.socal.res.rr.com
 [172.91.119.151])
 by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 04703160083;
 Sat, 27 Nov 2021 00:41:08 -0800 (PST)
Message-ID: <82e05201-e25e-716a-3b55-65130b6a9d56@HIDDEN>
Date: Sat, 27 Nov 2021 00:41:07 -0800
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
 Thunderbird/91.3.1
Subject: Re: bug#52115: Suggestion: LN command should swap TARGET and
 LINK_NAME if LINK_NAME already exists
Content-Language: en-US
To: Warren Parad <wparad@HIDDEN>
References: <CAB57QDm6P1yKL_yQmo8WW91oM4GOumS6ypNfqL_HS2n0b9QBnQ@HIDDEN>
 <333ee954-2643-1a6d-38fd-2f589864ca58@HIDDEN>
 <CAB57QDmVJ9H3ek4FASO1Z-qcVb19qn=PBDr_Y+Z=ZrtjWtz_1A@HIDDEN>
From: Paul Eggert <eggert@HIDDEN>
Organization: UCLA Computer Science Department
In-Reply-To: <CAB57QDmVJ9H3ek4FASO1Z-qcVb19qn=PBDr_Y+Z=ZrtjWtz_1A@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -2.4 (--)
X-Debbugs-Envelope-To: 52115
Cc: 52115 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.4 (---)

On 11/25/21 15:10, 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"

No, ln is exactly like mv and cp here: the source is the first argument, 
and the destination is the second.

If this isn't clear, perhaps we should make the documentation clearer; 
but we shouldn't change ln's behavior, as many people and programs rely 
on the current behavior, and the current behavior is more logical once 
you understand how file systems work.




Information forwarded to bug-coreutils@HIDDEN:
bug#52115; Package coreutils. Full text available.

Message received at 52115 <at> debbugs.gnu.org:


Received: (at 52115) by debbugs.gnu.org; 26 Nov 2021 07:25:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Nov 26 02:25:35 2021
Received: from localhost ([127.0.0.1]:58570 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mqVbz-0006fL-8E
	for submit <at> debbugs.gnu.org; Fri, 26 Nov 2021 02:25:35 -0500
Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:31684)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <kdudka@HIDDEN>) id 1mqVbx-0006fD-AO
 for 52115 <at> debbugs.gnu.org; Fri, 26 Nov 2021 02:25:34 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
 s=mimecast20190719; t=1637911533;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=ahApSG+G2PcXs7nSQExyX/8BnJHsxxQ0xVWgpxewnr8=;
 b=dNsr5IPlihmB4/svq8o2jn/oSICoQx1OZEcbWjxJ66XP5hodbHDwLuzZislXNj7Ui97wDB
 OikSzU+O89itjJ7GMOagF04Wtuovq3kzCTeJt0a/ND3ecXMswMeyVBkfGH3dLsajVqTXQK
 ckTUEPMF+e2xEVVQn9JQoei6B4oHYHM=
Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com
 [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS
 (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
 us-mta-194-Ubn29qCfOS6Ppu4Qxg5x3g-1; Fri, 26 Nov 2021 02:25:31 -0500
X-MC-Unique: Ubn29qCfOS6Ppu4Qxg5x3g-1
Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com
 [10.5.11.22])
 (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
 (No client certificate requested)
 by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 67E0B1006AA2;
 Fri, 26 Nov 2021 07:25:30 +0000 (UTC)
Received: from nbkamil.localnet (unknown [10.43.7.71])
 by smtp.corp.redhat.com (Postfix) with ESMTP id 5A04B1017E36;
 Fri, 26 Nov 2021 07:25:29 +0000 (UTC)
From: Kamil Dudka <kdudka@HIDDEN>
To: Warren Parad <wparad@HIDDEN>
Subject: Re: bug#52115: Suggestion: LN command should swap TARGET and
 LINK_NAME if LINK_NAME already exists
Date: Fri, 26 Nov 2021 08:25:28 +0100
Message-ID: <5517506.DvuYhMxLoT@nbkamil>
In-Reply-To: <CAB57QDmVJ9H3ek4FASO1Z-qcVb19qn=PBDr_Y+Z=ZrtjWtz_1A@HIDDEN>
References: <CAB57QDm6P1yKL_yQmo8WW91oM4GOumS6ypNfqL_HS2n0b9QBnQ@HIDDEN>
 <333ee954-2643-1a6d-38fd-2f589864ca58@HIDDEN>
 <CAB57QDmVJ9H3ek4FASO1Z-qcVb19qn=PBDr_Y+Z=ZrtjWtz_1A@HIDDEN>
MIME-Version: 1.0
X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22
Authentication-Results: relay.mimecast.com;
 auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kdudka@HIDDEN
X-Mimecast-Spam-Score: 0
X-Mimecast-Originator: redhat.com
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 52115
Cc: 52115 <at> debbugs.gnu.org, Bernhard Voelker <mail@HIDDEN>,
 bug-coreutils@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

On Friday, November 26, 2021 12:10:36 AM CET 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.
> 
> >  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 synopsis is already complex and confusing enough:
> Opinion, it is as complex as it allows, sounds like you are saying "LN
> Sucks, we really need 4 commands which are all simpler", sure okay we can
> have another command, but doing the right thing ALWAYS takes precedence
> over "I have an opinion"
> 
> > what happens if another (malicious?) user B creates LINK_TARGET while
> 
> user A is typing the command?
> While typing before entering? Then it doesn't matter if they are reversed
> since the command would still fail because both exist, that should result
> in the only real failure. I'm not suggesting removing the error in all
> cases.
> 
> >   $ ln -nsvf somename othername
> 
> WTF, yeah let's tell everyone that gets this wrong to delete the file they
> want to link, that's a genius idea.

Seriously, such experiments do not belong to the system implementation of 
ln(1).  If you really need this behavior, you can implement it as a shell 
function.  Sooner or later you will regret that you did it.

Kamil






Information forwarded to bug-coreutils@HIDDEN:
bug#52115; Package coreutils. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 26 Nov 2021 07:25:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Nov 26 02:25:40 2021
Received: from localhost ([127.0.0.1]:58573 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mqVc4-0006fe-GQ
	for submit <at> debbugs.gnu.org; Fri, 26 Nov 2021 02:25:40 -0500
Received: from lists.gnu.org ([209.51.188.17]:42014)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <kdudka@HIDDEN>) id 1mqVc1-0006fU-Ry
 for submit <at> debbugs.gnu.org; Fri, 26 Nov 2021 02:25:38 -0500
Received: from eggs.gnu.org ([209.51.188.92]:60362)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <kdudka@HIDDEN>) id 1mqVc1-00034s-Mt
 for bug-coreutils@HIDDEN; Fri, 26 Nov 2021 02:25:37 -0500
Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:32933)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <kdudka@HIDDEN>) id 1mqVby-0004kL-M2
 for bug-coreutils@HIDDEN; Fri, 26 Nov 2021 02:25:35 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
 s=mimecast20190719; t=1637911532;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=ahApSG+G2PcXs7nSQExyX/8BnJHsxxQ0xVWgpxewnr8=;
 b=dxO+abz0qZ4x5HPKPVPfa+yJskBdMbTfYX7mH+hT1tdijkp3dMaz8IOiE5UiwyfeQZBuPm
 HRV0yd39ZeyzbF07xbHCbhFzfLY+2vkDsWgVvUYNK4On4UfWw+SG0cdsekHTBjOpYtPlvB
 OmFzmC740ZnV4lL5eC7zetAX5MK8MUo=
Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com
 [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS
 (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
 us-mta-194-Ubn29qCfOS6Ppu4Qxg5x3g-1; Fri, 26 Nov 2021 02:25:31 -0500
X-MC-Unique: Ubn29qCfOS6Ppu4Qxg5x3g-1
Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com
 [10.5.11.22])
 (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
 (No client certificate requested)
 by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 67E0B1006AA2;
 Fri, 26 Nov 2021 07:25:30 +0000 (UTC)
Received: from nbkamil.localnet (unknown [10.43.7.71])
 by smtp.corp.redhat.com (Postfix) with ESMTP id 5A04B1017E36;
 Fri, 26 Nov 2021 07:25:29 +0000 (UTC)
From: Kamil Dudka <kdudka@HIDDEN>
To: Warren Parad <wparad@HIDDEN>
Subject: Re: bug#52115: Suggestion: LN command should swap TARGET and
 LINK_NAME if LINK_NAME already exists
Date: Fri, 26 Nov 2021 08:25:28 +0100
Message-ID: <5517506.DvuYhMxLoT@nbkamil>
In-Reply-To: <CAB57QDmVJ9H3ek4FASO1Z-qcVb19qn=PBDr_Y+Z=ZrtjWtz_1A@HIDDEN>
References: <CAB57QDm6P1yKL_yQmo8WW91oM4GOumS6ypNfqL_HS2n0b9QBnQ@HIDDEN>
 <333ee954-2643-1a6d-38fd-2f589864ca58@HIDDEN>
 <CAB57QDmVJ9H3ek4FASO1Z-qcVb19qn=PBDr_Y+Z=ZrtjWtz_1A@HIDDEN>
MIME-Version: 1.0
X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22
Authentication-Results: relay.mimecast.com;
 auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kdudka@HIDDEN
X-Mimecast-Spam-Score: 0
X-Mimecast-Originator: redhat.com
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"
Received-SPF: pass client-ip=170.10.133.124; envelope-from=kdudka@HIDDEN;
 helo=us-smtp-delivery-124.mimecast.com
X-Spam_score_int: -34
X-Spam_score: -3.5
X-Spam_bar: ---
X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.702,
 DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.4 (-)
X-Debbugs-Envelope-To: submit
Cc: 52115 <at> debbugs.gnu.org, Bernhard Voelker <mail@HIDDEN>,
 bug-coreutils@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.4 (--)

On Friday, November 26, 2021 12:10:36 AM CET 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.
> 
> >  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 synopsis is already complex and confusing enough:
> Opinion, it is as complex as it allows, sounds like you are saying "LN
> Sucks, we really need 4 commands which are all simpler", sure okay we can
> have another command, but doing the right thing ALWAYS takes precedence
> over "I have an opinion"
> 
> > what happens if another (malicious?) user B creates LINK_TARGET while
> 
> user A is typing the command?
> While typing before entering? Then it doesn't matter if they are reversed
> since the command would still fail because both exist, that should result
> in the only real failure. I'm not suggesting removing the error in all
> cases.
> 
> >   $ ln -nsvf somename othername
> 
> WTF, yeah let's tell everyone that gets this wrong to delete the file they
> want to link, that's a genius idea.

Seriously, such experiments do not belong to the system implementation of 
ln(1).  If you really need this behavior, you can implement it as a shell 
function.  Sooner or later you will regret that you did it.

Kamil






Information forwarded to bug-coreutils@HIDDEN:
bug#52115; Package coreutils. Full text available.

Message received at 52115 <at> debbugs.gnu.org:


Received: (at 52115) by debbugs.gnu.org; 25 Nov 2021 23:32:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 25 18:32:15 2021
Received: from localhost ([127.0.0.1]:58226 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mqODv-0000oo-CL
	for submit <at> debbugs.gnu.org; Thu, 25 Nov 2021 18:32:15 -0500
Received: from mout.kundenserver.de ([217.72.192.73]:46037)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mail@HIDDEN>) id 1mqODq-0000oX-AH
 for 52115 <at> debbugs.gnu.org; Thu, 25 Nov 2021 18:32:14 -0500
Received: from [192.168.101.10] ([91.1.221.176]) by mrelayeu.kundenserver.de
 (mreue106 [212.227.15.183]) with ESMTPSA (Nemesis) id
 1Mc0Er-1mLRaX2bGh-00dUkc; Fri, 26 Nov 2021 00:32:02 +0100
Message-ID: <1c1f8454-24a1-253b-83f3-9ab4ed105812@HIDDEN>
Date: Fri, 26 Nov 2021 00:32:01 +0100
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
 Thunderbird/91.3.0
Subject: Re: bug#52115: Suggestion: LN command should swap TARGET and
 LINK_NAME if LINK_NAME already exists
Content-Language: en-US
To: Warren Parad <wparad@HIDDEN>
References: <CAB57QDm6P1yKL_yQmo8WW91oM4GOumS6ypNfqL_HS2n0b9QBnQ@HIDDEN>
 <333ee954-2643-1a6d-38fd-2f589864ca58@HIDDEN>
 <CAB57QDmVJ9H3ek4FASO1Z-qcVb19qn=PBDr_Y+Z=ZrtjWtz_1A@HIDDEN>
From: Bernhard Voelker <mail@HIDDEN>
In-Reply-To: <CAB57QDmVJ9H3ek4FASO1Z-qcVb19qn=PBDr_Y+Z=ZrtjWtz_1A@HIDDEN>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:ndouCm311Zuxf+V+FlaYWr4j4ZiO/fDs5SdfT5EZh6fpUj0SoKT
 rOSL0GSbYtt08hsN6a7OkXD/8rl++aRP9SL//DtFXfkief5VME7Q31L5W62WkVZ8Rv5seNg
 c9mUYBiN0rS/xcvoAU4zQ+PBCqTslZTL6rqzksT2XMwXVwob1Y+sw/4ctQ7WHD+BITM5iwo
 kVQ0bb3AFgBP+kmiqesrQ==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:rEtkxHy64No=:HlUh82Qxuhy4z0Q5wkJHV8
 aLuhtlyvuCDpiSB1lpjA9JlerDMBuZAhD5YxgXOpPcjk4wZJCKsl/sutZa7XdqHvUYyoBpBnm
 5ETFzIEWWe1RIsNesBfvfEkXO+7qJRZg2HtF3j/tj234bWihREApZAzKYMT+okKnRPnDZJo7E
 7nMrsFAoWJhFMguhzGbo5gHu01fSGuDHKqAo2YE7YONsGmUM88YxaW3ueg0Sr6//E0heDgU/0
 FvAxsVv6NRkW4kg46nY7JQSaAl311fU7s2LSqmN/kOiWRSIOuxYkXnB0yZq1rJz1xS0L4gbN3
 LUScDtMXS/0tuadophf56kqbHi/SL4H9TOKsV8pRMUH2MVafS4+ViqCVbN9gv7MIcbuFqRK4p
 070ks8OJqE8TVXHtrX//XaR2GxZdEoVLJtZexq/kKmWMrzQBVa74HQnpcBe+7ZhBYOo1ygj8e
 ctFjr22JPCBCV2gM4ORdVHjw9EDEkxVHbif2d4Q4/NOPvWMFT57tk+1DuBrj3BTYkjPJh6pbJ
 3HBNW9fTSNjbJdDfqPmaf19TCwE5qZGM4vhy9Guzp0TLBsxOECEICzTumDDm3my2NGSkkFi10
 y4q9oy7T9ticCLrUnjA9wuO6jq2SkY9zgktqa6qKhTiTAA8Pcr/2W1T3sWmaXOr9TIiwxCO5Z
 7c+5pWFGb6ztZoCuShzjANq8RmAv5fiQBdo1M6whrS/UmGR7Yz1eG0VkpHiQB+bYksx61bm3n
 Rq00YkfQdYPBeHeQ
X-Spam-Score: -0.1 (/)
X-Debbugs-Envelope-To: 52115
Cc: 52115 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.1 (-)

On 11/26/21 00:10, Warren Parad wrote:
> On Fri, Nov 26, 2021 at 12:02 AM Bernhard Voelker <mail@HIDDEN <mailto:mail@HIDDEN>> wrote:
>> The synopsis is already complex and confusing enough:
>
> Opinion, it is as complex as it allows, sounds like you are saying "LN Sucks, we really need 4 commands
> which are all simpler", sure okay we can have another command, but doing the right thing ALWAYS takes
> precedence over "I have an opinion".

That is my opinion, correct.
Yet there's also standardization (POSIX) and 40+ years of known behavior.  Adding functionality has to be
well-thought and must not contradict any existing usage, nor open doors for more surprises to users.
Finally, there's compatibility to other implementations to consider.

>> what happens if another (malicious?) user B creates LINK_TARGET while user A is typing the command?
>
> While typing before entering? Then it doesn't matter if they are reversed since the command would still fail because
> both exist, that should result in the only real failure. I'm not suggesting removing the error in all cases.

That's the point: the outcome would greatly depend on whether LINK_TARGET is created as regular file
or as a directory.  And no, one cannot predict when another process is modifying the file system.
IMO this is more surprising and therefore inconvenient than to get an error message if the
user missed to put TARGET and LINK_NAME in the correct order.

Have a nice day,
Berny




Information forwarded to bug-coreutils@HIDDEN:
bug#52115; Package coreutils. Full text available.

Message received at 52115 <at> debbugs.gnu.org:


Received: (at 52115) by debbugs.gnu.org; 25 Nov 2021 23:11:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 25 18:11:20 2021
Received: from localhost ([127.0.0.1]:58205 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mqNtg-0000JY-1w
	for submit <at> debbugs.gnu.org; Thu, 25 Nov 2021 18:11:20 -0500
Received: from mail-ed1-f47.google.com ([209.85.208.47]:35479)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <wparad@HIDDEN>) id 1mqNtd-0000JK-V7
 for 52115 <at> debbugs.gnu.org; Thu, 25 Nov 2021 18:11:18 -0500
Received: by mail-ed1-f47.google.com with SMTP id v1so31251975edx.2
 for <52115 <at> debbugs.gnu.org>; Thu, 25 Nov 2021 15:11:17 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=ekrwbArDIhEfViCtVi8+0z40nqOkIZPGy9qV+X6eka8=;
 b=cGnb3XhWYaIxY4bO3td0PMrKatx2jTr4qxYcLuHDu3gqapQH4lCDkVULx38hbP7RjW
 J5gr5a3x9IvKp165Bo2KXUCwY8JCvWBnUMRHFy29gq3YVnkYv0DVOeozDcxUwK7lcjjI
 1B3/MAokGmLwqzXwQ0v/LxQiyGRa9nPAWjbNEnd7uZmQxmXqd3uCmarWjIqJMzw68ljW
 5hoKHvGfkHXj8mUAXcfoyIhxmL6cyupL/4rHMMGx2oLbzy/lXfApM+MMA9r87AqKWCbO
 tOpIskjNeV+veE66TjOXNUZvnPRoy2GwhK577/aaJiK278aSTvFR0Q2YJbSbuL8s08WU
 2Amg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=ekrwbArDIhEfViCtVi8+0z40nqOkIZPGy9qV+X6eka8=;
 b=sCvdm5oJlsIKfyxs62o7cncXxXgaFhGXDw2CkiKP59xNjiyk4UmTJhBqYNf5mjpKuK
 EQon1mBAkzDDUdxHW5XOKA2p8QA0igyZhvHGo1qrdGaDZekOmpiil5kbBuJxQjE816MG
 ZPym3BLxrzOQiV6toIlWmtOOJWGASOim0cPrtfM8Sls1/DmvpIDfywUiYThtYzcoVilq
 gZO/AOBP0XRy4fd1AJUYY1DVxKhHRbX+eATHDul7Lmr8XgFfFOWEoNdJWIAxEaCqTE7u
 QRY+4tpJvUEJ+Ly1oBUbZvJbqPyIaSoMU4wu9C5+5H/O7KJ57x0s6E+5qWsPzfmIksyP
 uxfA==
X-Gm-Message-State: AOAM5311glmqpGjTE42emyJ4tVtOd6V7GNOAaCOy8xB4EQUW5ARhauev
 233502lfb1bTJ2N8TWJ1Ywk+bFmuzDPo8sQZ+Qw=
X-Google-Smtp-Source: ABdhPJzS/MyICZtu8zAufVscy/uBr9DfagkjYMa8kw42OxBLaGair1Wneyq13xkzvZl5jHFnYyqRKsk5OGld1kUnXmU=
X-Received: by 2002:a05:6402:4312:: with SMTP id
 m18mr42643965edc.273.1637881871993; 
 Thu, 25 Nov 2021 15:11:11 -0800 (PST)
MIME-Version: 1.0
References: <CAB57QDm6P1yKL_yQmo8WW91oM4GOumS6ypNfqL_HS2n0b9QBnQ@HIDDEN>
 <333ee954-2643-1a6d-38fd-2f589864ca58@HIDDEN>
In-Reply-To: <333ee954-2643-1a6d-38fd-2f589864ca58@HIDDEN>
From: Warren Parad <wparad@HIDDEN>
Date: Fri, 26 Nov 2021 00:10:36 +0100
Message-ID: <CAB57QDmVJ9H3ek4FASO1Z-qcVb19qn=PBDr_Y+Z=ZrtjWtz_1A@HIDDEN>
Subject: Re: bug#52115: Suggestion: LN command should swap TARGET and
 LINK_NAME if LINK_NAME already exists
To: Bernhard Voelker <mail@HIDDEN>
Content-Type: multipart/alternative; boundary="0000000000002a0f9605d1a51713"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 52115
Cc: 52115 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--0000000000002a0f9605d1a51713
Content-Type: text/plain; charset="UTF-8"

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.

>  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 synopsis is already complex and confusing enough:
Opinion, it is as complex as it allows, sounds like you are saying "LN
Sucks, we really need 4 commands which are all simpler", sure okay we can
have another command, but doing the right thing ALWAYS takes precedence
over "I have an opinion"

> what happens if another (malicious?) user B creates LINK_TARGET while
user A is typing the command?
While typing before entering? Then it doesn't matter if they are reversed
since the command would still fail because both exist, that should result
in the only real failure. I'm not suggesting removing the error in all
cases.

>   $ ln -nsvf somename othername
WTF, yeah let's tell everyone that gets this wrong to delete the file they
want to link, that's a genius idea.

On Fri, Nov 26, 2021 at 12:02 AM Bernhard Voelker <mail@HIDDEN>
wrote:

> On 11/25/21 18:53, Warren Parad wrote:
> > It is too frequent a problem to know which is the correct order of TARGET
> > and LINK_NAME.
>
> I disagree: it is a one-time effort to learn the order ... similar as
> for mv(1) and cp(1).
>
> > Since the command already believes that it can't create a link to a file
> > which already exists (and for hard links that the TARGET must also
> exist),
> > instead of complaining, the command should just switch the order of the
> > parameters.
>
> The synopsis is already complex and confusing enough:
>
>   Usage: ln [OPTION]... [-T] TARGET LINK_NAME
>     or:  ln [OPTION]... TARGET
>     or:  ln [OPTION]... TARGET... DIRECTORY
>     or:  ln [OPTION]... -t DIRECTORY TARGET...
>
> and especially surprising if LINK_NAME is a directory name which the caller
> wasn't aware of.  Letting ln(1) automagically swap the parameters if
> LINK_NAME
> exists simply adds more confusion and opens maybe a big race window:
> what happens if another (malicious?) user B creates LINK_TARGET while user
> A
> is typing the command?
>
> Personally, I recommend the following option combination which results in
> less surprises (see other cases below):
>
>   $ ln -nsvf somename othername
>
> Especially when creating symlinks, I prefer to get an error early rather
> than
> ending up with a symlink with a name or location I never would have
> expected.
>
> Have a nice day,
> Berny
>

--0000000000002a0f9605d1a51713
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">except mv(1) and cp(1) are both &quot;FROM&quot; and then =
&quot;TO&quot;, but ln is backwards from thi, it is &quot;TO&quot; then &qu=
ot;FROM&quot;, the least the command could do is put these in the correct o=
rder.<div><br></div><div>&gt;=C2=A0 it is a one-time effort to learn the or=
der<br></div><div>Opinion, do you want proof that people can&#39;t learn th=
is, because they haven&#39;t.</div><div><br></div><div>&gt; The synopsis is=
 already complex and confusing enough:</div>Opinion, it is as complex as it=
 allows, sounds like you are saying &quot;LN Sucks, we really need 4 comman=
ds which are all simpler&quot;, sure okay we can have another command, but =
doing the right thing ALWAYS takes precedence over &quot;I have an opinion&=
quot;<div><br></div><div>&gt; what happens if another (malicious?) user B c=
reates LINK_TARGET while user A is typing the command?</div><div>While typi=
ng before entering? Then it doesn&#39;t matter if they are reversed since t=
he command would still fail because both exist, that should result in the o=
nly real failure. I&#39;m not suggesting removing the error in all cases.</=
div><div><br></div><div>&gt;=C2=A0 =C2=A0$ ln -nsvf somename othername</div=
>WTF, yeah let&#39;s tell everyone that gets this wrong to delete the file =
they want to link, that&#39;s a genius idea.</div><br><div class=3D"gmail_q=
uote"><div dir=3D"ltr" class=3D"gmail_attr">On Fri, Nov 26, 2021 at 12:02 A=
M Bernhard Voelker &lt;<a href=3D"mailto:mail@HIDDEN">mail@ber=
nhard-voelker.de</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" =
style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);pa=
dding-left:1ex">On 11/25/21 18:53, Warren Parad wrote:<br>
&gt; It is too frequent a problem to know which is the correct order of TAR=
GET<br>
&gt; and LINK_NAME.<br>
<br>
I disagree: it is a one-time effort to learn the order ... similar as<br>
for mv(1) and cp(1).<br>
<br>
&gt; Since the command already believes that it can&#39;t create a link to =
a file<br>
&gt; which already exists (and for hard links that the TARGET must also exi=
st),<br>
&gt; instead of complaining, the command should just switch the order of th=
e<br>
&gt; parameters.<br>
<br>
The synopsis is already complex and confusing enough:<br>
<br>
=C2=A0 Usage: ln [OPTION]... [-T] TARGET LINK_NAME<br>
=C2=A0 =C2=A0 or:=C2=A0 ln [OPTION]... TARGET<br>
=C2=A0 =C2=A0 or:=C2=A0 ln [OPTION]... TARGET... DIRECTORY<br>
=C2=A0 =C2=A0 or:=C2=A0 ln [OPTION]... -t DIRECTORY TARGET...<br>
<br>
and especially surprising if LINK_NAME is a directory name which the caller=
<br>
wasn&#39;t aware of.=C2=A0 Letting ln(1) automagically swap the parameters =
if LINK_NAME<br>
exists simply adds more confusion and opens maybe a big race window:<br>
what happens if another (malicious?) user B creates LINK_TARGET while user =
A<br>
is typing the command?<br>
<br>
Personally, I recommend the following option combination which results in<b=
r>
less surprises (see other cases below):<br>
<br>
=C2=A0 $ ln -nsvf somename othername<br>
<br>
Especially when creating symlinks, I prefer to get an error early rather th=
an<br>
ending up with a symlink with a name or location I never would have expecte=
d.<br>
<br>
Have a nice day,<br>
Berny<br>
</blockquote></div>

--0000000000002a0f9605d1a51713--




Information forwarded to bug-coreutils@HIDDEN:
bug#52115; Package coreutils. Full text available.

Message received at 52115 <at> debbugs.gnu.org:


Received: (at 52115) by debbugs.gnu.org; 25 Nov 2021 23:03:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 25 18:03:01 2021
Received: from localhost ([127.0.0.1]:58193 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mqNlc-00007X-SZ
	for submit <at> debbugs.gnu.org; Thu, 25 Nov 2021 18:03:01 -0500
Received: from mout.kundenserver.de ([217.72.192.74]:43067)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mail@HIDDEN>) id 1mqNlW-00007E-BC
 for 52115 <at> debbugs.gnu.org; Thu, 25 Nov 2021 18:02:58 -0500
Received: from [192.168.101.10] ([91.1.221.176]) by mrelayeu.kundenserver.de
 (mreue108 [212.227.15.183]) with ESMTPSA (Nemesis) id
 1MybCV-1mgx9W1MhZ-00yznA; Fri, 26 Nov 2021 00:02:47 +0100
Message-ID: <333ee954-2643-1a6d-38fd-2f589864ca58@HIDDEN>
Date: Fri, 26 Nov 2021 00:02:46 +0100
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
 Thunderbird/91.3.0
Subject: Re: bug#52115: Suggestion: LN command should swap TARGET and
 LINK_NAME if LINK_NAME already exists
Content-Language: en-US
To: Warren Parad <wparad@HIDDEN>, 52115 <at> debbugs.gnu.org
References: <CAB57QDm6P1yKL_yQmo8WW91oM4GOumS6ypNfqL_HS2n0b9QBnQ@HIDDEN>
From: Bernhard Voelker <mail@HIDDEN>
In-Reply-To: <CAB57QDm6P1yKL_yQmo8WW91oM4GOumS6ypNfqL_HS2n0b9QBnQ@HIDDEN>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:P+mqa0ewyOrhcJmyWb2UO5ReXD8NGKAHd6/1168FJlFISa7TkVa
 Sy3zWmPF58zOGv4+lGjmgkS3TpIcdPwEGq9h3YPODEb14d145PvChIzX+p4AYpENaLJVoPt
 FKWjD75gUXSeN8498ev9P/Gv9Z56LpEHjbfCaUAEV91Jaswn3r3cqOjHUmOMa113ILa49MK
 sxk7k5kE+dABuNeE2JbDQ==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:fGnGVvQLDhU=:9puJZjbvvvtXL2CogyXNTq
 SgZGhftARqpqkH8PAzSZZcgYUlO4kTBBGHitFfNkRkDCpKF170GEKlsxHz0HOwh1q86XSqrg2
 n6dRWn5PATvR64xzrlN+D/V2RLNe6gkgjrAjPxpHxOjuRjLI2RLv27wEx4nctFKgwXcGXjU0Q
 CTLSIceEdLIknamHRRdnGL7F6D1PcUwPKe5TS3ywn3OPryCqKiD9IZ0RZJ68OJT2TSSEpCXnp
 ebNWHZWpFQ9PG59Cazt/c14s3/FVEG9Ru0vOcd2bygwvJOazkzTAxSUFRJuE++4mLrj0FLtce
 9mql4fcmGHWGuLJe7aB0GZBIq56dULxn+J10OAkcCnIx+JiopbOddLEvIa0mSvQf7Dw24lvlY
 umgvFTPoaLUQHJebt2pbe+Z94khiBLc33HPutSWp+b5oHIqOK9sbOkXo3sAHSn9wNiWggl/Y0
 /pq2WxGLi/8Q5qcTarpFKfy2h9UnfaWL+aHog7StAeMYGEz1LmTPaCTfyL08XIzh1o6ahMm10
 8j3f4Fzt8AypPgYoYREJj6W9PVNr7JZHdsWxjZrB2Q36ttGV2+w2y/F1cN6wGF/BV8tfcaYY0
 r8N2ZKnTT2iryMB1VklBuh6NoCcgOz4w/gHwqMT53ylWKWVupAjm6T6y9qoLaQ26+rUK9rX+G
 V8fkXPyDkuIzUA118qI1ycdXRhOuJTOPjtM905HvSFx/BYiAMOMJ2PD3Zakn2JJkAY7psvXn6
 KmxzgY5s10D6u1tp
X-Spam-Score: -0.1 (/)
X-Debbugs-Envelope-To: 52115
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.1 (-)

On 11/25/21 18:53, Warren Parad wrote:
> It is too frequent a problem to know which is the correct order of TARGET
> and LINK_NAME.

I disagree: it is a one-time effort to learn the order ... similar as
for mv(1) and cp(1).

> Since the command already believes that it can't create a link to a file
> which already exists (and for hard links that the TARGET must also exist),
> instead of complaining, the command should just switch the order of the
> parameters.

The synopsis is already complex and confusing enough:

  Usage: ln [OPTION]... [-T] TARGET LINK_NAME
    or:  ln [OPTION]... TARGET
    or:  ln [OPTION]... TARGET... DIRECTORY
    or:  ln [OPTION]... -t DIRECTORY TARGET...

and especially surprising if LINK_NAME is a directory name which the caller
wasn't aware of.  Letting ln(1) automagically swap the parameters if LINK_NAME
exists simply adds more confusion and opens maybe a big race window:
what happens if another (malicious?) user B creates LINK_TARGET while user A
is typing the command?

Personally, I recommend the following option combination which results in
less surprises (see other cases below):

  $ ln -nsvf somename othername

Especially when creating symlinks, I prefer to get an error early rather than
ending up with a symlink with a name or location I never would have expected.

Have a nice day,
Berny




Information forwarded to bug-coreutils@HIDDEN:
bug#52115; Package coreutils. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 25 Nov 2021 20:24:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 25 15:24:36 2021
Received: from localhost ([127.0.0.1]:58106 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mqLIH-0004mO-7x
	for submit <at> debbugs.gnu.org; Thu, 25 Nov 2021 15:24:36 -0500
Received: from lists.gnu.org ([209.51.188.17]:52448)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <wparad@HIDDEN>) id 1mqIxB-0001Bo-NV
 for submit <at> debbugs.gnu.org; Thu, 25 Nov 2021 12:54:38 -0500
Received: from eggs.gnu.org ([209.51.188.92]:55212)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <wparad@HIDDEN>) id 1mqIxB-0001ai-3F
 for bug-coreutils@HIDDEN; Thu, 25 Nov 2021 12:54:37 -0500
Received: from [2a00:1450:4864:20::535] (port=45767
 helo=mail-ed1-x535.google.com)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <wparad@HIDDEN>) id 1mqIx8-0002hB-Np
 for bug-coreutils@HIDDEN; Thu, 25 Nov 2021 12:54:35 -0500
Received: by mail-ed1-x535.google.com with SMTP id y12so28609837eda.12
 for <bug-coreutils@HIDDEN>; Thu, 25 Nov 2021 09:54:26 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=mime-version:from:date:message-id:subject:to;
 bh=cY0koxbibHgJWiwlDXcEYRoMX06yNiJ5qLQ6jUt/h5g=;
 b=h9NlXy6iEr71rkinIvMo+GcBGqNmPUvDuRdHL4ehqDDEQKO8oP0bxoZUeFv766pR/b
 /qb1qgKvx8jmIXxQmbSTqwJu6NVZkG3CEly+1zkPdwPzDcYNqEwxRHCJR3hpUU8jvknN
 YtVdiuXnPjH3+jzYMSDitXyQaBuA83/o+1uUVSKPVYqL1l7S4z7TobIEDCCr6kXhDvtL
 wALWO1fm1rBFsVJjVq0uzfHFiupUbHi/xSR8lQfsE7rkO5tJ8jRCTNxwuyp0lTq2CRvJ
 CYHhleDyMmMDOyCldpA+3zDdC9kgQO0+AKR71mMJwRbkWnjTnAflAt5Byczn/KiWnqQL
 rZCg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:mime-version:from:date:message-id:subject:to;
 bh=cY0koxbibHgJWiwlDXcEYRoMX06yNiJ5qLQ6jUt/h5g=;
 b=6MHVtfx9oD9rV5h+0u+v+tpXM28th0pc+FrqZITcyffJeMiywB5AMxYibtNblhz7fK
 VDOMj197vmLzxq5PiBICvTIvM9rlZFZWfoRbUCwQuhurGaUU5/CHxpPbWLEktc9Q4yd9
 cPX4By1V/FpXABf53LM+pCHz59rfqETSHZQFVCUHAJGEOUxV5tXtR91hVJwENYvXNobw
 o6BQPdUvTSZBiUSS1unrY1dqh+x4wNK9b0q9KVl2CqFPDT7Nxb0EcIRZ1o+4MXxSB/63
 o13Me229MIPuIfeEqB2s4KkK4j7576r3yE7Dzzq+1kuZT1TrhZGaps1fTuncRiww8IG4
 dWLg==
X-Gm-Message-State: AOAM530Xh+qdJwQ2JBKiHsVe1ncXgwVu1JcK2ISJMm+Ty3il6NNoCSYK
 LIx57RLMwWKdu1bLbzbobbgH4FTkOgiHkWOzB3PTWuzzHrw=
X-Google-Smtp-Source: ABdhPJyIvG5HrMBH3ojN1EX5OGEvffBgnwwuwsQUnz04V143buk6SdQiglbg0QrcWbwuYf/yEwQTb9+jfhx1JUjAhwQ=
X-Received: by 2002:a50:9d48:: with SMTP id j8mr41240116edk.192.1637862865292; 
 Thu, 25 Nov 2021 09:54:25 -0800 (PST)
MIME-Version: 1.0
From: Warren Parad <wparad@HIDDEN>
Date: Thu, 25 Nov 2021 18:53:49 +0100
Message-ID: <CAB57QDm6P1yKL_yQmo8WW91oM4GOumS6ypNfqL_HS2n0b9QBnQ@HIDDEN>
Subject: Suggestion: LN command should swap TARGET and LINK_NAME if LINK_NAME
 already exists
To: bug-coreutils@HIDDEN
Content-Type: multipart/alternative; boundary="00000000000046d27a05d1a0aa46"
X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::535
 (failed)
Received-SPF: pass client-ip=2a00:1450:4864:20::535;
 envelope-from=wparad@HIDDEN; helo=mail-ed1-x535.google.com
X-Spam_score_int: 14
X-Spam_score: 1.4
X-Spam_bar: +
X-Spam_report: (1.4 / 5.0 requ) BAYES_50=0.8, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
 DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 HTML_MESSAGE=0.001, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001,
 RDNS_NONE=0.793, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=no autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Thu, 25 Nov 2021 15:24:31 -0500
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

--00000000000046d27a05d1a0aa46
Content-Type: text/plain; charset="UTF-8"

It is too frequent a problem to know which is the correct order of TARGET
and LINK_NAME.

Since the command already believes that it can't create a link to a file
which already exists (and for hard links that the TARGET must also exist),
instead of complaining, the command should just switch the order of the
parameters.

--00000000000046d27a05d1a0aa46
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">It is too frequent a problem to know which is the correct =
order of TARGET and LINK_NAME.<div><br></div><div>Since the command already=
 believes that it can&#39;t create a link to a file which already exists (a=
nd for hard links that the TARGET must also exist), instead of complaining,=
 the command should just switch the order of the parameters.</div></div>

--00000000000046d27a05d1a0aa46--




Acknowledgement sent to Warren Parad <wparad@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-coreutils@HIDDEN. Full text available.
Report forwarded to bug-coreutils@HIDDEN:
bug#52115; Package coreutils. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 29 Nov 2021 20:15:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.