Bug 124865

Summary: "mv -i --reply=no" silently over-writes files.
Product: [Fedora] Fedora Reporter: Ed Price <edp>
Component: coreutilsAssignee: Tim Waugh <twaugh>
Severity: high Docs Contact:
Priority: medium    
Version: 1   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-02-21 14:03:53 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Ed Price 2004-05-31 12:30:41 EDT
Description of problem:

"mv -i --reply=no" is supposed to be equivalent to answering "no" to
the prompt given by "mv -i".  ie, it is supposed to NOT over-write 
existing files.  but instead, it DOES over-write existing files.  ie
it behaves exactly like "mv -i --reply=yes" (or just "mv").

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. touch a b
2. mv -i --reply=no a b
3. ls

Actual results:
only "b" exists.

Expected results:
both "a" and "b" should exist.

Additional info:

redhat-7.2: --reply is not understood by mv.
redhat-8.0: has the bug.
rehdat-9.0: has the bug.

[edp@wpax edp]$ mkdir test
[edp@wpax edp]$ cd test
[edp@wpax test]$ touch a b
[edp@wpax test]$ ls -l
total 0
-rw-rw-r--  1 edp edp 0 May 31 12:15 a
-rw-rw-r--  1 edp edp 0 May 31 12:15 b
[edp@wpax test]$ mv -i a b
mv: overwrite `b'? no
[edp@wpax test]$ ls -l
total 0
-rw-rw-r--  1 edp edp 0 May 31 12:15 a
-rw-rw-r--  1 edp edp 0 May 31 12:15 b
[edp@wpax test]$ mv -i --reply=no a b
[edp@wpax test]$ ls -l
total 0
-rw-rw-r--  1 edp edp 0 May 31 12:15 b
[edp@wpax test]$ rpm -q --whatprovides /bin/mv
[edp@wpax test]$
Comment 1 Ed Price 2004-05-31 12:39:08 EDT
oops, it's a dupe.  (i did search first, dont know why i didnt find
the other one...)

now i don't understand what "--reply" is supposed to do.

the documentation should be improved, certainly.  and possibly
"--reply" should still be changed to work as users would reasonably

sorry for the dupe, good luck with upstream discussion :)

*** This bug has been marked as a duplicate of 120742 ***
Comment 2 Red Hat Bugzilla 2006-02-21 14:03:53 EST
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.