From unknown Sun Aug 17 22:00:17 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#6022 <6022@debbugs.gnu.org> To: bug#6022 <6022@debbugs.gnu.org> Subject: Status: cp: Make --backup the default Reply-To: bug#6022 <6022@debbugs.gnu.org> Date: Mon, 18 Aug 2025 05:00:17 +0000 retitle 6022 cp: Make --backup the default reassign 6022 coreutils submitter 6022 Salvador severity 6022 wishlist tag 6022 moreinfo thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 24 06:32:02 2010 Received: (at submit) by debbugs.gnu.org; 24 Apr 2010 10:32:02 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O5ceV-0005Jj-QZ for submit@debbugs.gnu.org; Sat, 24 Apr 2010 06:31:59 -0400 Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O5b5c-0004XB-HS for submit@debbugs.gnu.org; Sat, 24 Apr 2010 04:51:53 -0400 Received: from lists.gnu.org ([199.232.76.165]:39653) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1O5b5Z-000290-JC for submit@debbugs.gnu.org; Sat, 24 Apr 2010 04:51:49 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O5b5Z-0001K5-4L for bug-coreutils@gnu.org; Sat, 24 Apr 2010 04:51:49 -0400 Received: from [140.186.70.92] (port=57428 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O5b5W-0001Jx-O1 for bug-coreutils@gnu.org; Sat, 24 Apr 2010 04:51:47 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,T_DKIM_INVALID, T_TO_NO_BRKTS_FREEMAIL autolearn=no version=3.3.0 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O5b5V-00070n-Ng for bug-coreutils@gnu.org; Sat, 24 Apr 2010 04:51:46 -0400 Received: from mail-gw0-f41.google.com ([74.125.83.41]:51183) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O5b5V-00070g-LD for bug-coreutils@gnu.org; Sat, 24 Apr 2010 04:51:45 -0400 Received: by gwj15 with SMTP id 15so3678350gwj.0 for ; Sat, 24 Apr 2010 01:51:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:content-type :content-transfer-encoding; bh=YXZCu+5YXlMi79tPFO4srSR7NlMKyC8VK7daOqjNa6Y=; b=BvNajYpMb2eeOjSN5KM3F1pNpFsdEeZDzt+lHYKl0NNTXZsNmvQ04jrOMOxJiilWGY jiLzEPFWltfKP8dSKBnkm0CunIus6IcNTkRuKaNS+6iDH1vwOS7nxvFbp4zpjdUGaNR/ /xLcayWwtMYdnvQgmMgUf2iyVkCEkIUKD4haw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=eiOvUz+ayEdHvmueMTyqOr66CLlFrKehCVgGmttAXVW/3dgdn4Zm+zZis9BnTw3rAA PMYbNSBgSaPGvWiIlRi8vdki0vwfAjQ+3yISJF0eqhuHb8Zqa4DjKGdqI+YU+svU4b0U 61EJtKsK0Xu4lgA0oYnPiblvuqR92ac9SrXIY= Received: by 10.101.149.17 with SMTP id b17mr1356447ano.80.1272099104358; Sat, 24 Apr 2010 01:51:44 -0700 (PDT) Received: from [192.168.1.101] (201-213-35-125.net.prima.net.ar [201.213.35.125]) by mx.google.com with ESMTPS id t28sm19139054ano.16.2010.04.24.01.51.42 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 24 Apr 2010 01:51:43 -0700 (PDT) Message-ID: <4BD2B11C.9000103@gmail.com> Date: Sat, 24 Apr 2010 05:51:40 -0300 From: Salvador User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.10pre) Gecko/20100330 Shredder/3.0.5pre MIME-Version: 1.0 To: bug-coreutils@gnu.org Subject: An enhancement request for the Cp command. Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -5.9 (-----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sat, 24 Apr 2010 06:31:57 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.9 (-----) Hello. I want to request a feature for the Cp command that consist in renaming a file from the source when a file in the destination directory with the same name already exists. I am thought It could be something like: from file.jpg to file-1.jpg. This behavior already exists in Web browsers and file managers. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 24 15:32:25 2010 Received: (at control) by debbugs.gnu.org; 24 Apr 2010 19:32:25 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O5l5U-000287-Mh for submit@debbugs.gnu.org; Sat, 24 Apr 2010 15:32:24 -0400 Received: from joseki.proulx.com ([216.17.153.58]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O5l5R-00027w-KU; Sat, 24 Apr 2010 15:32:23 -0400 Received: from dementia.proulx.com (dementia.proulx.com [192.168.230.115]) by joseki.proulx.com (Postfix) with ESMTP id 88B4021363; Sat, 24 Apr 2010 13:32:19 -0600 (MDT) Received: by dementia.proulx.com (Postfix, from userid 1000) id 686D73CC39E; Sat, 24 Apr 2010 13:32:19 -0600 (MDT) Date: Sat, 24 Apr 2010 13:32:19 -0600 From: Bob Proulx To: Salvador Subject: Re: bug#6023: An enhancement request for the Cp command. Message-ID: <20100424193219.GA30814@dementia.proulx.com> References: <4BD2B11C.9000103@gmail.com> <4BD2B1E9.9000201@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4BD2B1E9.9000201@gmail.com> User-Agent: Mutt/1.5.18 (2008-05-17) X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: control Cc: 6023@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.5 (--) forcemerge 6022 6023 severity 6023 wishlist tags 6023 + moreinfo retitle 6023 cp: Make --backup the default thanks Salvador wrote: > Salvador wrote: >> I want to request a feature for the Cp command that consist in >> renaming a file from the source when a file in the destination >> directory with the same name already exists. I am thought It could be >> something like: from file.jpg to file-1.jpg. >> This behavior already exists in Web browsers and file managers. >> Thanks. > Also, I know about the backup argument but it makes the file not being > possible to use by some programs without being renamed. As you say the feature already exists with 'cp --backup[=CONTROL]' and therefore you already have that behavior available to you. If I understand what you are saying then you are asking for it to be made the default behavior. But if that were done it would break 40 years of Unix behavior. It is not wise to make such changes. In order to stabilize the Unix API the POSIX standard defines the cp behavior that everyone can rely upon having here: http://www.opengroup.org/onlinepubs/009695399/utilities/cp.html If you desire to have a command that defaults to making a backup all of the time you may easily do so by creating a differently named command. This would avoid breaking legacy applications because it wouldn't change the behavior of the cp command upon which everyone counts on. You could name it 'cpbak' or some such name. #!/bin/sh exec cp --backup "$@" Bob From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 26 22:11:31 2010 Received: (at 6022-done) by debbugs.gnu.org; 27 Dec 2010 03:11:32 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PX3Uh-000362-2b for submit@debbugs.gnu.org; Sun, 26 Dec 2010 22:11:31 -0500 Received: from joseki.proulx.com ([216.17.153.58]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PX3Ue-00035q-Tc for 6022-done@debbugs.gnu.org; Sun, 26 Dec 2010 22:11:29 -0500 Received: from hysteria.proulx.com (hysteria.proulx.com [192.168.230.119]) by joseki.proulx.com (Postfix) with ESMTP id 582B921366; Sun, 26 Dec 2010 20:18:15 -0700 (MST) Received: by hysteria.proulx.com (Postfix, from userid 1000) id 4C5F32DD7B; Sun, 26 Dec 2010 20:18:15 -0700 (MST) Date: Sun, 26 Dec 2010 20:18:15 -0700 From: Bob Proulx To: Salvador Subject: Re: bug#6022: An enhancement request for the Cp command. Message-ID: <20101227031815.GB30361@hysteria.proulx.com> References: <4BD2B11C.9000103@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4BD2B11C.9000103@gmail.com> User-Agent: Mutt/1.5.20 (2009-06-14) X-Spam-Score: -2.4 (--) X-Debbugs-Envelope-To: 6022-done Cc: 6022-done@debbugs.gnu.org, Drake Wyrm X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.4 (--) This issue has been marked as needing more information from the submitter for quite a while. The last was 246 days ago on 24 Apr 2010. Without any more input this issue cannot make progress. Therefore I am closing the bug report. Note that I think there may be something there with the enhancement request. Drake Wyrm wrote: > I think what he wants is for the backup mechanism to preserve an > existing suffix on the filename by inserting the versioning token > somewhere in the middle of the filename. I think that could be a useful feature. But it would need someone to work on it and it would need a good statement of the feature. Drake's summary and example looked like a good place to start. But it isn't a trivial feature to implement and some cases will cause trouble. Bob From unknown Sun Aug 17 22:00:17 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, 24 Jan 2011 12:24:04 +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