Red Hat Bugzilla – Bug 120742
mv -i --reply=no doesn't seem to work
Last modified: 2007-11-30 17:10:40 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5)
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):
Steps to Reproduce:
1. run the command "mv -i --reply=no"
Actual Results: Files got overwritten when they shouldn't have.
Expected Results: I expected files with the same name to not be
Confirmed; reported upstream.
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.
*** Bug 124865 has been marked as a duplicate of this bug. ***