bug#11859: Reporting Bug (Enhancement) : Interactive Command for Copying (original) (raw)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
From: | Eric Blake |
---|---|
Subject: | bug#11859: Reporting Bug (Enhancement) : Interactive Command for Copying Files (cp -i) |
Date: | Wed, 04 Jul 2012 13:47:59 -0600 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1 |
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 address@hidden +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- bug#11859: Reporting Bug (Enhancement) : Interactive Command for Copying Files (cp -i), Sitam Jana, 2012/07/04
- bug#11859: Reporting Bug (Enhancement) : Interactive Command for Copying Files (cp -i),Eric Blake <=
- Prev by Date:bug#11858: df -m undocumented, why no df -g
- Next by Date:bug#11858: df -m undocumented, why no df -g
- Previous by thread:bug#11859: Reporting Bug (Enhancement) : Interactive Command for Copying Files (cp -i)
- Next by thread:bug#11866: command date don't accept 61 sec. minutes
- Index(es):