bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mv -i --reply=no ... acts like --reply=yes


From: Jim Meyering
Subject: Re: mv -i --reply=no ... acts like --reply=yes
Date: Thu, 15 Apr 2004 17:25:01 +0200

Tim Waugh <address@hidden> wrote:
> With coreutils-5.2.1, I see unexpected behaviour with mv -i
> --reply=no:
>
> $ rm -rf x
> $ mkdir -p x/a x/b
> $ cd x
> $ echo a > a/foo
> $ echo b > b/foo
> $ mv -i --reply=no a/foo b/foo
> $ cat b/foo
> a

That's because -i is equivalent to --reply=query (as mentioned in --help),
and since you specify --reply=no after -i,
the --reply=no takes precedence.

The --reply=S option was added to ensure that this use of `mv'
(note the absence of a -i option)

  touch a b; chmod u-w b; mv a b

could be made to do its job without prompting the user.
Without an option like --reply=yes, the above would prompt
the user with e.g., `mv: overwrite `b', overriding mode 0444?

Obviously, the descriptions (both --help and info) could be improved.
Corrections welcomed.  Though maybe the whole --reply=S addition
deserves to be rethought.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]