Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 161615 - mv --reply=no does not work as expected
Summary: mv --reply=no does not work as expected
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: coreutils
Version: 4
Hardware: athlon
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact:
URL:
Whiteboard:
: 161616 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-06-24 20:26 UTC by Hal Canary
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-06-27 09:25:23 UTC


Attachments (Terms of Use)

Description Hal Canary 2005-06-24 20:26:47 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050524 Fedora/1.0.4-4 Firefox/1.0.4

Description of problem:
touch file1 file2
mv --reply=no file1 file2
ls file1 file2


mv should not overwrite file2.  It does.

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

How reproducible:
Always

Steps to Reproduce:
1. touch file1 file2
2. mv --reply=no file1 file2
3. ls file1 file2
  

Actual Results:  /bin/ls: file1: No such file or directory
file2


Expected Results:  file1 file2

Additional info:

Comment 1 Hal Canary 2005-06-24 20:31:10 UTC
*** Bug 161616 has been marked as a duplicate of this bug. ***

Comment 2 Tim Waugh 2005-06-24 20:48:42 UTC
Why would you expect that behaviour?  Omitting '--reply=no' would not cause a
prompt to reply to!

Comment 3 Hal Canary 2005-06-27 06:15:49 UTC
From "info coreutils mv":

"Specify `--reply=no' to make `mv' act as if `no' were given as a response to
every prompt about a destination file. "

$ touch file1 file2
$ mv --reply=query file1 file2
mv: overwrite `file2'? n

I have a script that renames files.  But I do not want this scipt to ever
clobber an existing file.  Right now, I do "mv --reply=query" or "mv -i" to keep
the existing file from being overwriten.  Then I manually type "n".  I want to
not have to type "n" each time.  

Acording to the man page, "--reply=no" should "specify how to handle the prompt
about an  existing destination file."  In other words: "No, I don't want to
overwrite that file."

Omitting '--reply=' would be equivilent to "--reply=yes"



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