From unknown Mon Jun 23 04:09:21 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#40353 <40353@debbugs.gnu.org> To: bug#40353 <40353@debbugs.gnu.org> Subject: Status: cp -a --attributes-only zeroes a file with more than one link Reply-To: bug#40353 <40353@debbugs.gnu.org> Date: Mon, 23 Jun 2025 11:09:21 +0000 retitle 40353 cp -a --attributes-only zeroes a file with more than one link reassign 40353 coreutils submitter 40353 Matt Kloss severity 40353 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 31 11:36:50 2020 Received: (at submit) by debbugs.gnu.org; 31 Mar 2020 15:36:50 +0000 Received: from localhost ([127.0.0.1]:36845 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jJIwc-0007lN-G9 for submit@debbugs.gnu.org; Tue, 31 Mar 2020 11:36:50 -0400 Received: from lists.gnu.org ([209.51.188.17]:47362) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jJH8K-0003t3-7C for submit@debbugs.gnu.org; Tue, 31 Mar 2020 09:40:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44637) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJH8I-0002MZ-Sg for bug-coreutils@gnu.org; Tue, 31 Mar 2020 09:40:48 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.5 required=5.0 tests=BAYES_20,FREEMAIL_FROM, HTML_MESSAGE,HTML_MIME_NO_HTML_TAG,MIME_HTML_ONLY,RCVD_IN_DNSWL_NONE, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jJH8G-0006WO-V5 for bug-coreutils@gnu.org; Tue, 31 Mar 2020 09:40:45 -0400 Received: from forward104o.mail.yandex.net ([37.140.190.179]:49785) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jJH8G-0006UP-Bv for bug-coreutils@gnu.org; Tue, 31 Mar 2020 09:40:44 -0400 Received: from mxback5o.mail.yandex.net (mxback5o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::1f]) by forward104o.mail.yandex.net (Yandex) with ESMTP id 4E3AD941F0E for ; Tue, 31 Mar 2020 16:40:41 +0300 (MSK) Received: from localhost (localhost [::1]) by mxback5o.mail.yandex.net (mxback/Yandex) with ESMTP id VgBqUsysF8-eeuqRE8Y; Tue, 31 Mar 2020 16:40:40 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.com; s=mail; t=1585662040; bh=U5sISdtdXcqxf/7ufl9FLpksk/urrTq/4bh5bYEfemo=; h=Message-Id:Subject:In-Reply-To:Date:References:To:From; b=JjuDyB606l9dOReYqs1t5AMZ6YichrtNU5EwciR0rgxw+gtf8ZYkXZXURZObJS0Jc ifVCUhqhmOuP8EFRLrSZAnYGSFt9o4k6iZx8kN14GY0//ObhW7onDaWdLcTWlDaiRq dFd73Cp/8+xbb6nK+p8139M8o2vanmPBJ9Yep77Y= Authentication-Results: mxback5o.mail.yandex.net; dkim=pass header.i=@yandex.com Received: by myt6-674c1815a2f0.qloud-c.yandex.net with HTTP; Tue, 31 Mar 2020 16:40:40 +0300 From: Matt Kloss Envelope-From: matt-kloss@yandex.com To: "bug-coreutils@gnu.org" In-Reply-To: <7539201585657706@iva1-e3ac85a63903.qloud-c.yandex.net> References: <7539201585657706@iva1-e3ac85a63903.qloud-c.yandex.net> Subject: Re: cp -a --attributes-only zeroes a file with more than one link MIME-Version: 1.0 X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Tue, 31 Mar 2020 15:40:40 +0200 Message-Id: <8462791585661637@vla4-fbefcb3b0074.qloud-c.yandex.net> Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 37.140.190.179 X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Tue, 31 Mar 2020 11:36:47 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/)
31.03.2020, 14:32, "Matt Kloss" <matt.kloss@yandex.com>:
=
foo has a size of 0 bytes!
The user thinks he'= s replicating timestamp and permissions, and he's actually deleting data.= (Well, the data is still in foo2, but...)
=C2=A0<= /div>
To be clear, when doing cp -a --attributes-only aaa foo (linked= to foo2), the behaviour I expect is that foo and foo2 still point to the= same inode as before, of course with their content unchanged, and that t= he attributes of both links now match those of aaa=E2=80=94like when you = "chmod" or "touch" a link.