From unknown Wed Jun 18 23:13:48 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#11859 <11859@debbugs.gnu.org> To: bug#11859 <11859@debbugs.gnu.org> Subject: Status: Reporting Bug (Enhancement) : Interactive Command for Copying Files (cp -i) Reply-To: bug#11859 <11859@debbugs.gnu.org> Date: Thu, 19 Jun 2025 06:13:48 +0000 retitle 11859 Reporting Bug (Enhancement) : Interactive Command for Copying= Files (cp -i)=20 reassign 11859 coreutils submitter 11859 "Sitam Jana" severity 11859 normal tag 11859 notabug thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 04 14:42:30 2012 Received: (at submit) by debbugs.gnu.org; 4 Jul 2012 18:42:30 +0000 Received: from localhost ([127.0.0.1]:48368 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SmUWw-0002wj-0l for submit@debbugs.gnu.org; Wed, 04 Jul 2012 14:42:30 -0400 Received: from eggs.gnu.org ([208.118.235.92]:44462) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SmKpx-0003og-7B for submit@debbugs.gnu.org; Wed, 04 Jul 2012 04:21:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SmKlF-0000lq-FA for submit@debbugs.gnu.org; Wed, 04 Jul 2012 04:16:39 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,HTML_MESSAGE, RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:41253) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SmKlF-0000lj-Bu for submit@debbugs.gnu.org; Wed, 04 Jul 2012 04:16:33 -0400 Received: from eggs.gnu.org ([208.118.235.92]:60482) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SmKlD-0001wS-Hi for bug-coreutils@gnu.org; Wed, 04 Jul 2012 04:16:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SmKl7-0000iq-2W for bug-coreutils@gnu.org; Wed, 04 Jul 2012 04:16:30 -0400 Received: from bbs.stpi.in ([203.129.205.10]:54144) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SmKl6-0000hz-B5 for bug-coreutils@gnu.org; Wed, 04 Jul 2012 04:16:24 -0400 Received: from mindfiresolutions.com ([203.129.204.50]) by bbs.stpi.in (8.12.10+Sun/8.12.10) with ESMTP id q647rhj9006513 for ; Wed, 4 Jul 2012 13:23:44 +0530 (IST) Received: from sitamwin7 [192.168.9.107] by mindfiresolutions.com (FTGate 2, 2, 0, 1); Wed, 04 Jul 12 13:38:40 +0530 Message-ID: <287D20D1147341EC88DEAD4CAF731904@sitamwin7> From: "Sitam Jana" To: Subject: Reporting Bug (Enhancement) : Interactive Command for Copying Files (cp -i) Date: Wed, 4 Jul 2012 13:46:04 +0530 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0003_01CD59EB.5B1323A0" X-Priority: 3 X-MSMail-Priority: Normal Importance: Normal X-Mailer: Microsoft Windows Live Mail 15.4.3555.308 X-MimeOLE: Produced By Microsoft MimeOLE V15.4.3555.308 X-detected-operating-system: by eggs.gnu.org: Solaris 9 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Wed, 04 Jul 2012 14:42:11 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 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: -6.9 (------) This is a multi-part message in MIME format. ------=_NextPart_000_0003_01CD59EB.5B1323A0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi GNU-Team, While going through the command for =E2=80=9CCopying File=E2=80=9D in = Unix and executing the same, I found one good enhancement for the = command : $ cp -i . Bug Report :- Type : Enhancement Description : Final status needs to be displayed for the specified = command. Precondition : File with the same name is already present in the target = folder or target path. Steps to reproduce : 1. Open the terminal and type the command - $ cp -i = . file-name =E2=80=93 Name of the file to be copied.=20 target-folder =E2=80=93 Name of the target folder for copying the = file. target-path =E2=80=93 Name of the target path for copying the file. 2. Type =E2=80=9Cy=E2=80=9D for the warning message : =E2=80=9Ccp: = overwrite ... ?=E2=80=9D. Actual result : Final status for the copy not displayed. =20 Expected result : As the command is an interactive command, it should = display a final status message in the terminal to the user whether the = file is actually overwritten or not.=20 Example of the final status message :=20 1. If user type =E2=80=9Cy=E2=80=9D for the warning message, final = status message can be : =E2=80=9CFile is successfully = overwritten=E2=80=9D. 2. If user type =E2=80=9Cother than y=E2=80=9D for the warning message, = final status message can be : =E2=80=9CFile is not overwritten=E2=80=9D. = =20 Thanks and regards Sitam Jana QA Engineer Mindfire Solutions Bhubaneswar, India ------=_NextPart_000_0003_01CD59EB.5B1323A0 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable
Hi GNU-Team,
 
While going through the command for = =E2=80=9CCopying=20 File=E2=80=9D in Unix and executing the same, I found one good = enhancement for the=20 command : $ cp -i <file-name> <target-folder or=20 target-path>.
 
Bug Report :-
Type :=20 Enhancement
Description : Final = status=20 needs to be displayed for the specified command.
Precondition : File = with the=20 same name is already present in the target folder or target = path.
Steps to reproduce=20 :
1. Open the terminal and type the = command - $=20 cp -i <file-name> <target-folder or = target-path>.
    = file-name =E2=80=93 Name=20 of the file to be copied.
    target-folder = =E2=80=93 Name of=20 the target folder for copying the file.
    = target-path =E2=80=93 Name=20 of the target path for copying the file.
2. Type =E2=80=9Cy=E2=80=9D for the = warning message : =E2=80=9Ccp:=20 overwrite ... ?=E2=80=9D.
 
Actual result : = Final status=20 for the copy not displayed. 
Expected result : = As the=20 command is an interactive command, it should display a final status = message in=20 the terminal to the user whether the file is actually overwritten or = not.=20
Example of the final status = message=20 :
1. If user type =E2=80=9Cy=E2=80=9D = for the warning message,=20 final status message can be : =E2=80=9CFile is successfully = overwritten=E2=80=9D.
2. If user type =E2=80=9Cother than = y=E2=80=9D for the warning=20 message, final status message can be : =E2=80=9CFile is not=20 overwritten=E2=80=9D.   
 
Thanks and=20 regards
Sitam=20 Jana
QA = Engineer
Mindfire=20 Solutions
Bhubaneswar, = India
 
------=_NextPart_000_0003_01CD59EB.5B1323A0-- From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 04 15:52:54 2012 Received: (at control) by debbugs.gnu.org; 4 Jul 2012 19:52:54 +0000 Received: from localhost ([127.0.0.1]:48479 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SmVd8-0004Ye-29 for submit@debbugs.gnu.org; Wed, 04 Jul 2012 15:52:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:7865) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SmVd4-0004YM-ET; Wed, 04 Jul 2012 15:52:52 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q64Jm15U032005 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 4 Jul 2012 15:48:01 -0400 Received: from [10.3.113.17] ([10.3.113.17]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q64Jm0L0013962; Wed, 4 Jul 2012 15:48:00 -0400 Message-ID: <4FF49DEF.1030901@redhat.com> Date: Wed, 04 Jul 2012 13:47:59 -0600 From: Eric Blake Organization: Red Hat User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1 MIME-Version: 1.0 To: Sitam Jana Subject: Re: bug#11859: Reporting Bug (Enhancement) : Interactive Command for Copying Files (cp -i) References: <287D20D1147341EC88DEAD4CAF731904@sitamwin7> In-Reply-To: <287D20D1147341EC88DEAD4CAF731904@sitamwin7> X-Enigmail-Version: 1.4.2 OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enigAE92D56AEED15EEBE68158AD" X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: control Cc: control@debbugs.gnu.org, 11859-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 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: -6.9 (------) This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigAE92D56AEED15EEBE68158AD Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable tag 11859 notabug thanks On 07/04/2012 02:16 AM, Sitam Jana wrote: > Actual result : Final status for the copy not displayed. =20 > Expected result : As the command is an interactive command, it should d= isplay a final status message in the terminal to the user whether the fil= e is actually overwritten or not.=20 > Example of the final status message :=20 > 1. If user type =E2=80=9Cy=E2=80=9D for the warning message, final stat= us message can be : =E2=80=9CFile is successfully overwritten=E2=80=9D. > 2. If user type =E2=80=9Cother than y=E2=80=9D for the warning message,= final status message can be : =E2=80=9CFile is not overwritten=E2=80=9D.= Thanks for the suggestion. However, the behavior of 'cp -i' without other options is standardized, and POSIX does not permit this additional informational message: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/cp.html If you go beyond the standard and use extension options, then 'cp -i --verbose' (can be shortened to 'cp -iv') does close to what you want, in that it gives positive output on a successful copy and no output for an aborted copy: $ cp -vi file file2 cp: overwrite `file2'? n $ cp -vi file file2 cp: overwrite `file2'? y `file' -> `file2' At this point, I'm going to close this; any change to provide additional output would require a new extension option, and since users wouldn't get the new behavior unless they used the new option, you are unlikely to have people using what you term as 'more friendly interactive behavior'. But feel free to provide any further comments or patches if you think you can successfully argue your point. --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enigAE92D56AEED15EEBE68158AD Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJP9J3vAAoJEKeha0olJ0NqwJMH/iwVwfueA5l/OboOBNckVWKy +/CqAmmAUyF/17yuRRisE1dWF0/GbUZRm6JbtU76RozxRowdicvaRcLRSj06KYat RVzl+lLbH34Irn2y/HE20qSGrbBM9pRvAJlnzau9My0rpE2YBfyJw8tbiLIIcJP6 oW5bUPGMksFeFwYXr3UqMW/yWVSraTbFMuq4McQJqvsUiiNQ7cjc7CMsiixLVi+K PDTZVg0HgQmx5oRgd7+a+C5OPxVAFqfRkQJwQtSPazTuOVfMcWHbjjAkmXqNjITp 3zaRUAaV0d0H2m9KXMkVfJQtfGqSBbcZ323a2KvVT4qJAzQr0rAv6ytmu01ZYc8= =q2jJ -----END PGP SIGNATURE----- --------------enigAE92D56AEED15EEBE68158AD-- From unknown Wed Jun 18 23:13:48 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 02 Aug 2012 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