From unknown Fri Sep 05 09:10:42 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#17578 <17578@debbugs.gnu.org> To: bug#17578 <17578@debbugs.gnu.org> Subject: Status: cp(1) man page: behavior of "cp -R dir target" on symbolic links is unclear Reply-To: bug#17578 <17578@debbugs.gnu.org> Date: Fri, 05 Sep 2025 16:10:42 +0000 retitle 17578 cp(1) man page: behavior of "cp -R dir target" on symbolic li= nks is unclear reassign 17578 coreutils submitter 17578 Vincent Lefevre severity 17578 normal tag 17578 wontfix thanks From debbugs-submit-bounces@debbugs.gnu.org Sat May 24 11:07:45 2014 Received: (at submit) by debbugs.gnu.org; 24 May 2014 15:07:45 +0000 Received: from localhost ([127.0.0.1]:59194 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WoDY0-0006vb-7s for submit@debbugs.gnu.org; Sat, 24 May 2014 11:07:44 -0400 Received: from eggs.gnu.org ([208.118.235.92]:37994) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WoDXy-0006vO-AC for submit@debbugs.gnu.org; Sat, 24 May 2014 11:07:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WoDXl-0003pG-Ud for submit@debbugs.gnu.org; Sat, 24 May 2014 11:07:36 -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.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:52939) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WoDXl-0003pC-Rf for submit@debbugs.gnu.org; Sat, 24 May 2014 11:07:29 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39701) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WoDXf-0007zx-Pg for bug-coreutils@gnu.org; Sat, 24 May 2014 11:07:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WoDXX-0003kx-DU for bug-coreutils@gnu.org; Sat, 24 May 2014 11:07:23 -0400 Received: from ioooi.vinc17.net ([92.243.22.117]:53551) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WoDXX-0003k2-6K for bug-coreutils@gnu.org; Sat, 24 May 2014 11:07:15 -0400 Received: from smtp-xvii.vinc17.net (128.119.75.86.rev.sfr.net [86.75.119.128]) by ioooi.vinc17.net (Postfix) with ESMTPSA id 57C96D0; Sat, 24 May 2014 17:07:06 +0200 (CEST) Received: by xvii.vinc17.org (Postfix, from userid 1000) id F09DE21A06C; Sat, 24 May 2014 17:07:05 +0200 (CEST) Date: Sat, 24 May 2014 17:07:05 +0200 From: Vincent Lefevre To: bug-coreutils@gnu.org Subject: cp(1) man page: behavior of "cp -R dir target" on symbolic links is unclear Message-ID: <20140524150705.GA17811@xvii.vinc17.org> Mail-Followup-To: Vincent Lefevre , bug-coreutils@gnu.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline X-Mailer-Info: http://www.vinc17.net/mutt/ User-Agent: Mutt/1.5.21-6305-vl-r59709 (2013-04-16) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: -5.0 (-----) The cp(1) man page does not describe the behavior on symbolic links when copying recursively. It appears that in such a case, cp does not dereference the links (this is also what the info file says: "When copying from a symbolic link, `cp' normally follows the link only when not copying recursively."). Tested with cp (GNU coreutils) 8.21 on Debian/unstable. As the usual behavior of utilities on symbolic links is to follow the links, this may be surprising to the user who only reads the man page (even if he knows POSIX, as POSIX doesn't specify the behavior if only -R is used). So, the man page should say that by default (e.g. without -H, -L, -P), cp follows source symbolic links only when not copying recursively. --=20 Vincent Lef=E8vre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon) From debbugs-submit-bounces@debbugs.gnu.org Sat May 24 13:29:18 2014 Received: (at submit) by debbugs.gnu.org; 24 May 2014 17:29:18 +0000 Received: from localhost ([127.0.0.1]:59274 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WoFl0-0002PP-4F for submit@debbugs.gnu.org; Sat, 24 May 2014 13:29:18 -0400 Received: from eggs.gnu.org ([208.118.235.92]:58973) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WoFkw-0002P4-SM for submit@debbugs.gnu.org; Sat, 24 May 2014 13:29:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WoFkh-0003c8-Px for submit@debbugs.gnu.org; Sat, 24 May 2014 13:29:09 -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.0 required=5.0 tests=BAYES_20 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:58073) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WoFkh-0003c4-NS for submit@debbugs.gnu.org; Sat, 24 May 2014 13:28:59 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60674) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WoFka-0000IM-6E for bug-coreutils@gnu.org; Sat, 24 May 2014 13:28:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WoFkS-0003b0-OU for bug-coreutils@gnu.org; Sat, 24 May 2014 13:28:52 -0400 Received: from smtp.cs.ucla.edu ([131.179.128.62]:38220) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WoFkS-0003am-J8 for bug-coreutils@gnu.org; Sat, 24 May 2014 13:28:44 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 44B6939E801A; Sat, 24 May 2014 10:28:43 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id U+0VSEqSgw6x; Sat, 24 May 2014 10:28:34 -0700 (PDT) Received: from [192.168.1.9] (pool-108-0-233-62.lsanca.fios.verizon.net [108.0.233.62]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 82FC8A60028; Sat, 24 May 2014 10:28:34 -0700 (PDT) Message-ID: <5380D6BE.1070602@cs.ucla.edu> Date: Sat, 24 May 2014 10:28:30 -0700 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: Vincent Lefevre , bug-coreutils@gnu.org Subject: Re: bug#17578: cp(1) man page: behavior of "cp -R dir target" on symbolic links is unclear References: <20140524150705.GA17811@xvii.vinc17.org> In-Reply-To: <20140524150705.GA17811@xvii.vinc17.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: -4.0 (----) Vincent Lefevre wrote: > this is also what the info file says: "When > copying from a symbolic link, `cp' normally follows the link only > when not copying recursively." Must be an old version; the current text says "When copying from a symbolic link, 'cp' normally follows the link only when not copying recursively or when '--link' ('-l') is used." A bit complicated, unfortunately; don't know whether that detail is worth adding to the --help output (which the man page is derived from). From debbugs-submit-bounces@debbugs.gnu.org Sat May 24 13:38:17 2014 Received: (at submit) by debbugs.gnu.org; 24 May 2014 17:38:17 +0000 Received: from localhost ([127.0.0.1]:59283 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WoFtg-0002j8-S1 for submit@debbugs.gnu.org; Sat, 24 May 2014 13:38:17 -0400 Received: from eggs.gnu.org ([208.118.235.92]:59871) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WoFte-0002ip-KT for submit@debbugs.gnu.org; Sat, 24 May 2014 13:38:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WoFtS-0006Bh-AQ for submit@debbugs.gnu.org; Sat, 24 May 2014 13:38:09 -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.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:55413) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WoFtS-0006Bd-8C for submit@debbugs.gnu.org; Sat, 24 May 2014 13:38:02 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33337) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WoFtM-0001zn-2M for bug-coreutils@gnu.org; Sat, 24 May 2014 13:38:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WoFtC-0006AI-Jw for bug-coreutils@gnu.org; Sat, 24 May 2014 13:37:56 -0400 Received: from ioooi.vinc17.net ([92.243.22.117]:53572) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WoFtC-0006A9-Cj for bug-coreutils@gnu.org; Sat, 24 May 2014 13:37:46 -0400 Received: from smtp-xvii.vinc17.net (128.119.75.86.rev.sfr.net [86.75.119.128]) by ioooi.vinc17.net (Postfix) with ESMTPSA id 4D95A24D; Sat, 24 May 2014 19:37:44 +0200 (CEST) Received: by xvii.vinc17.org (Postfix, from userid 1000) id 0E43721A06C; Sat, 24 May 2014 19:37:44 +0200 (CEST) Date: Sat, 24 May 2014 19:37:43 +0200 From: Vincent Lefevre To: Paul Eggert Subject: Re: bug#17578: cp(1) man page: behavior of "cp -R dir target" on symbolic links is unclear Message-ID: <20140524173743.GQ31407@xvii.vinc17.org> Mail-Followup-To: Vincent Lefevre , Paul Eggert , bug-coreutils@gnu.org References: <20140524150705.GA17811@xvii.vinc17.org> <5380D6BE.1070602@cs.ucla.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <5380D6BE.1070602@cs.ucla.edu> X-Mailer-Info: http://www.vinc17.net/mutt/ User-Agent: Mutt/1.5.21-6305-vl-r59709 (2013-04-16) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit Cc: bug-coreutils@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: -5.0 (-----) On 2014-05-24 10:28:30 -0700, Paul Eggert wrote: > Vincent Lefevre wrote: > >this is also what the info file says: "When > >copying from a symbolic link, `cp' normally follows the link only > >when not copying recursively." >=20 > Must be an old version; The man page says: GNU coreutils 8.21 April 2014 = CP(1) April 2014, thus not that old. --=20 Vincent Lef=E8vre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon) From debbugs-submit-bounces@debbugs.gnu.org Sat May 24 22:19:15 2014 Received: (at 17578) by debbugs.gnu.org; 25 May 2014 02:19:15 +0000 Received: from localhost ([127.0.0.1]:59507 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WoO1q-0003VG-4D for submit@debbugs.gnu.org; Sat, 24 May 2014 22:19:14 -0400 Received: from joseki.proulx.com ([216.17.153.58]:47361) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WoO1n-0003V4-41 for 17578@debbugs.gnu.org; Sat, 24 May 2014 22:19:12 -0400 Received: from hysteria.proulx.com (hysteria.proulx.com [192.168.230.119]) by joseki.proulx.com (Postfix) with ESMTP id CE6F321229; Sat, 24 May 2014 20:19:08 -0600 (MDT) Received: by hysteria.proulx.com (Postfix, from userid 1000) id A34882DC27; Sat, 24 May 2014 20:19:08 -0600 (MDT) Date: Sat, 24 May 2014 20:19:08 -0600 From: Bob Proulx To: Vincent Lefevre Subject: Re: bug#17578: cp(1) man page: behavior of "cp -R dir target" on symbolic links is unclear Message-ID: <20140525021908.GA24931@hysteria.proulx.com> Mail-Followup-To: Vincent Lefevre , 17578@debbugs.gnu.org References: <20140524150705.GA17811@xvii.vinc17.org> <5380D6BE.1070602@cs.ucla.edu> <20140524173743.GQ31407@xvii.vinc17.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140524173743.GQ31407@xvii.vinc17.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 17578 Cc: 17578@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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.7 (/) Vincent Lefevre wrote: > Paul Eggert wrote: > > Must be an old version; > > The man page says: > GNU coreutils 8.21 April 2014 CP(1) > April 2014, thus not that old. On your system that must be the date when the man page was formatted. It isn't the date when the version was released. Version 8.21 was released 2013-02-14 and so is now a little over a year old. (Which I still consider relatively recent. But a year ago recent not a month ago recent.) Bob From debbugs-submit-bounces@debbugs.gnu.org Sun May 25 07:13:53 2014 Received: (at 17578) by debbugs.gnu.org; 25 May 2014 11:13:53 +0000 Received: from localhost ([127.0.0.1]:59608 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WoWNF-0004oh-1f for submit@debbugs.gnu.org; Sun, 25 May 2014 07:13:53 -0400 Received: from mail4.vodafone.ie ([213.233.128.170]:51006) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WoWNC-0004oQ-A6 for 17578@debbugs.gnu.org; Sun, 25 May 2014 07:13:51 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: At0BAFjPgVNtT9ze/2dsb2JhbAANTLFlkT6BcoEeAYEZgxkBAQEEgQkLDQsJFg8JAwIBAgFFBgEMCAEBiEOyIaUyF45ZhEABA6EHjguBQQ Received: from unknown (HELO [192.168.1.79]) ([109.79.220.222]) by mail3.vodafone.ie with ESMTP; 25 May 2014 12:13:43 +0100 Message-ID: <5381D066.3050902@draigBrady.com> Date: Sun, 25 May 2014 12:13:42 +0100 From: =?ISO-8859-1?Q?P=E1draig_Brady?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: Vincent Lefevre , 17578@debbugs.gnu.org Subject: Re: bug#17578: cp(1) man page: behavior of "cp -R dir target" on symbolic links is unclear References: <20140524150705.GA17811@xvii.vinc17.org> In-Reply-To: <20140524150705.GA17811@xvii.vinc17.org> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 17578 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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 (/) On 05/24/2014 04:07 PM, Vincent Lefevre wrote: > The cp(1) man page does not describe the behavior on symbolic links > when copying recursively. It appears that in such a case, cp does not > dereference the links (this is also what the info file says: "When > copying from a symbolic link, `cp' normally follows the link only > when not copying recursively."). Tested with cp (GNU coreutils) 8.21 > on Debian/unstable. > > As the usual behavior of utilities on symbolic links is to follow the > links, this may be surprising to the user who only reads the man page > (even if he knows POSIX, as POSIX doesn't specify the behavior if > only -R is used). > > So, the man page should say that by default (e.g. without -H, -L, -P), > cp follows source symbolic links only when not copying recursively. I suppose we could adjust --help (and thus the man page) like: - -R, -r, --recursive copy directories recursively + -R, -r, --recursive copy directories recursively (implies -P) From debbugs-submit-bounces@debbugs.gnu.org Sun May 25 16:27:19 2014 Received: (at 17578) by debbugs.gnu.org; 25 May 2014 20:27:19 +0000 Received: from localhost ([127.0.0.1]:59928 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wof0o-0002rG-MN for submit@debbugs.gnu.org; Sun, 25 May 2014 16:27:19 -0400 Received: from smtp.cs.ucla.edu ([131.179.128.62]:34735) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wof0l-0002r0-KO for 17578@debbugs.gnu.org; Sun, 25 May 2014 16:27:17 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id ECD69A60005; Sun, 25 May 2014 13:27:09 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7cD3EEj+wjCM; Sun, 25 May 2014 13:27:01 -0700 (PDT) Received: from [192.168.1.9] (pool-108-0-233-62.lsanca.fios.verizon.net [108.0.233.62]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 6515CA60007; Sun, 25 May 2014 13:27:01 -0700 (PDT) Message-ID: <53825214.8030600@cs.ucla.edu> Date: Sun, 25 May 2014 13:27:00 -0700 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= , Vincent Lefevre , 17578@debbugs.gnu.org Subject: Re: bug#17578: cp(1) man page: behavior of "cp -R dir target" on symbolic links is unclear References: <20140524150705.GA17811@xvii.vinc17.org> <5381D066.3050902@draigBrady.com> In-Reply-To: <5381D066.3050902@draigBrady.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: -3.0 (---) X-Debbugs-Envelope-To: 17578 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: -3.0 (---) Pádraig Brady wrote: > - -R, -r, --recursive copy directories recursively > + -R, -r, --recursive copy directories recursively (implies -P) Unfortunately it's not that simple, as -R doesn't always imply -P. From debbugs-submit-bounces@debbugs.gnu.org Mon May 26 04:59:14 2014 Received: (at 17578) by debbugs.gnu.org; 26 May 2014 08:59:14 +0000 Received: from localhost ([127.0.0.1]:60282 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WoqkU-0000YV-3W for submit@debbugs.gnu.org; Mon, 26 May 2014 04:59:14 -0400 Received: from mail3.vodafone.ie ([213.233.128.45]:60653) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WoqkR-0000Y8-Nk; Mon, 26 May 2014 04:59:12 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtUBAPoAg1NtTKbf/2dsb2JhbAANTA6HDapXkT6BcoEeAYElgxkBAQEEIw8BRhALDQsCAgUWCwICCQMCAQIBRQYNAQcBAYhDsVd3pFEXgSqNKAeCdYFLAQOhB44LgQBB Received: from unknown (HELO [192.168.1.79]) ([109.76.166.223]) by mail3.vodafone.ie with ESMTP; 26 May 2014 09:59:05 +0100 Message-ID: <53830258.3090303@draigBrady.com> Date: Mon, 26 May 2014 09:59:04 +0100 From: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: Paul Eggert Subject: Re: bug#17578: cp(1) man page: behavior of "cp -R dir target" on symbolic links is unclear References: <20140524150705.GA17811@xvii.vinc17.org> <5381D066.3050902@draigBrady.com> <53825214.8030600@cs.ucla.edu> In-Reply-To: <53825214.8030600@cs.ucla.edu> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 17578 Cc: 17578@debbugs.gnu.org, Vincent Lefevre X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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 (/) tag 17578 wontfix close 17578 stop On 05/25/2014 09:27 PM, Paul Eggert wrote: > Pádraig Brady wrote: >> - -R, -r, --recursive copy directories recursively >> + -R, -r, --recursive copy directories recursively (implies -P) > > Unfortunately it's not that simple, as -R doesn't always imply -P. Yes we shouldn't assume users would know that -H and -L would override -P. Also --link is recently wound up in this. Hence it's not easy to describe. We could accurately describe using something like the following, but given that the info docs are correct and complete here and that most users use -a anyway which already explicitly considers --no-dereference, it's probably best to err on the side of conciseness in the man/--help and let users refer to info for complete docs. thanks, Pádraig. diff --git a/src/cp.c b/src/cp.c index 243d6af..878266a 100644 --- a/src/cp.c +++ b/src/cp.c @@ -206,7 +206,8 @@ Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.\n\ --parents use full source file name under DIRECTORY\n\ "), stdout); fputs (_("\ - -R, -r, --recursive copy directories recursively (implies -P)\n\ + -R, -r, --recursive copy directories recursively. Without -H,-L or\n\ + --link, implies --no-dereference\n\ --reflink[=WHEN] control clone/CoW copies. See below\n\ --remove-destination remove each existing destination file before\n\ attempting to open it (contrast with --force)\ From debbugs-submit-bounces@debbugs.gnu.org Mon May 26 05:31:29 2014 Received: (at 17578) by debbugs.gnu.org; 26 May 2014 09:31:29 +0000 Received: from localhost ([127.0.0.1]:60293 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WorFh-0002lJ-CR for submit@debbugs.gnu.org; Mon, 26 May 2014 05:31:29 -0400 Received: from ypig.lip.ens-lyon.fr ([140.77.13.48]:56266) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WorFe-0002l9-Ds for 17578@debbugs.gnu.org; Mon, 26 May 2014 05:31:27 -0400 Received: from vlefevre by ypig.lip.ens-lyon.fr with local (Exim 4.82) (envelope-from ) id 1WorFZ-0002Py-KX; Mon, 26 May 2014 11:31:21 +0200 Date: Mon, 26 May 2014 11:31:21 +0200 From: Vincent Lefevre To: =?iso-8859-1?Q?P=E1draig?= Brady Subject: Re: bug#17578: cp(1) man page: behavior of "cp -R dir target" on symbolic links is unclear Message-ID: <20140526093121.GL6890@ypig.lip.ens-lyon.fr> References: <20140524150705.GA17811@xvii.vinc17.org> <5381D066.3050902@draigBrady.com> <53825214.8030600@cs.ucla.edu> <53830258.3090303@draigBrady.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <53830258.3090303@draigBrady.com> X-Mailer-Info: http://www.vinc17.net/mutt/ User-Agent: Mutt/1.5.21-6305-vl-r59709 (2013-04-16) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 17578 Cc: Paul Eggert , 17578@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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 (/) On 2014-05-26 09:59:04 +0100, Pádraig Brady wrote: > Yes we shouldn't assume users would know that -H and -L would override -P. > Also --link is recently wound up in this. Hence it's not easy to describe. It could be described like in the info file. > We could accurately describe using something like the following, but given > that the info docs are correct and complete here Not all users use the info docs (I find man / --help easier to use). > and that most users use -a anyway which already explicitly considers > --no-dereference, That's the point of this bug report: I usually use -a, which implies --no-dereference, so that I thought that -R alone would avoid this --no-dereference, but this is not the way cp behaves. > it's probably best to err on the side of conciseness in the > man/--help and let users refer to info for complete docs. That would just be one sentence below the list of options (a bit like in the info doc). -- Vincent Lefèvre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon) From unknown Fri Sep 05 09:10:42 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 23 Jun 2014 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator