GNU bug report logs - #11859
Reporting Bug (Enhancement) : Interactive Command for Copying Files (cp -i)

Previous Next

Package: coreutils;

Reported by: "Sitam Jana" <sitamj <at> mindfiresolutions.com>

Date: Wed, 4 Jul 2012 18:43:07 UTC

Severity: normal

Tags: notabug

Done: Eric Blake <eblake <at> redhat.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: "Sitam Jana" <sitamj <at> mindfiresolutions.com>
Subject: bug#11859: closed (Re: bug#11859: Reporting Bug (Enhancement) :
 Interactive Command for Copying Files (cp -i))
Date: Wed, 04 Jul 2012 19:53:03 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#11859: Reporting Bug (Enhancement) : Interactive Command for Copying Files (cp -i) 

which was filed against the coreutils package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 11859 <at> debbugs.gnu.org.

-- 
11859: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11859
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Eric Blake <eblake <at> redhat.com>
To: Sitam Jana <sitamj <at> mindfiresolutions.com>
Cc: control <at> debbugs.gnu.org, 11859-done <at> debbugs.gnu.org
Subject: Re: bug#11859: Reporting Bug (Enhancement) : Interactive Command
	for Copying Files (cp -i)
Date: Wed, 04 Jul 2012 13:47:59 -0600
[Message part 3 (text/plain, inline)]
tag 11859 notabug
thanks

On 07/04/2012 02:16 AM, Sitam Jana wrote:

> Actual result : Final status for the copy not displayed.  
> 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. 
> Example of the final status message : 
> 1. If user type “y” for the warning message, final status message can be : “File is successfully overwritten”.
> 2. If user type “other than y” for the warning message, final status message can be : “File is not overwritten”.

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.

-- 
Eric Blake   eblake <at> redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org



[signature.asc (application/pgp-signature, attachment)]
[Message part 5 (message/rfc822, inline)]
From: "Sitam Jana" <sitamj <at> mindfiresolutions.com>
To: <bug-coreutils <at> gnu.org>
Subject: Reporting Bug (Enhancement) : Interactive Command for Copying Files
	(cp -i) 
Date: Wed, 4 Jul 2012 13:46:04 +0530
[Message part 6 (text/plain, inline)]
Hi GNU-Team,

While going through the command for “Copying File” in Unix and executing the same, I found one good enhancement for the command : $ cp -i <file-name> <target-folder or target-path>.

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> <target-folder or target-path>.
    file-name – Name of the file to be copied. 
    target-folder – Name of the target folder for copying the file.
    target-path – Name of the target path for copying the file.
2. Type “y” for the warning message : “cp: overwrite ... ?”.

Actual result : Final status for the copy not displayed.  
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. 
Example of the final status message : 
1. If user type “y” for the warning message, final status message can be : “File is successfully overwritten”.
2. If user type “other than y” for the warning message, final status message can be : “File is not overwritten”.    

Thanks and regards
Sitam Jana
QA Engineer
Mindfire Solutions
Bhubaneswar, India
[Message part 7 (text/html, inline)]

This bug report was last modified 12 years and 323 days ago.

Previous Next


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