This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 120742 - mv -i --reply=no doesn't seem to work
mv -i --reply=no doesn't seem to work
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: coreutils (Show other bugs)
1
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Tim Waugh
:
: 124865 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-04-13 13:36 EDT by Glen
Modified: 2007-11-30 17:10 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-04-21 11:50:50 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Glen 2004-04-13 13:36:11 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5)
Gecko/20031007 Firebird/0.7

Description of problem:
I'm trying this command:
mv -i --reply=no * /some/directory

If there are files in the destination directory with the same name as
the files in the source directory, they will get overwritten.

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

How reproducible:
Always

Steps to Reproduce:
1. run the command "mv -i --reply=no"
2.
3.
    

Actual Results:  Files got overwritten when they shouldn't have.

Expected Results:  I expected files with the same name to not be
overwritten.

Additional info:
Comment 1 Tim Waugh 2004-04-15 09:31:02 EDT
Confirmed; reported upstream.
Comment 2 Tim Waugh 2004-04-21 11:50:50 EDT
This is expected behaviour -- '-i' is equivalent to '--reply=ask', and
'--reply=no' overrides that.  The --reply option affects questions
that would have been asked had --reply not been specified.

So, if the destination file did not have w permission, --reply=no
would have done what you wanted.

In fact, the -u option is what you were after, but it isn't obvious. 
Discussing upstream.
Comment 3 Ed Price 2004-05-31 12:39:09 EDT
*** Bug 124865 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.