[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug] coreutils 5.2.1 - incorrect behaviour for mv --reply=no
From: |
Jim Meyering |
Subject: |
Re: [bug] coreutils 5.2.1 - incorrect behaviour for mv --reply=no |
Date: |
Wed, 13 Feb 2008 09:13:38 +0100 |
"Wilber" <address@hidden> wrote:
> When using the option --reply=no for mv, it still overwrites the file when it
> is not supposed to.
>
> Here is a quick demo:
> address@hidden ~]# mkdir mvtest
> address@hidden ~]# cd mvtest/
> address@hidden mvtest]# mkdir moveto
> address@hidden mvtest]# echo test > file.ext
> address@hidden mvtest]# touch moveto/file.ext
> address@hidden mvtest]# ls
> file.ext moveto
> address@hidden mvtest]# mv --reply=no -v file.ext moveto/
> `file.ext' -> `moveto/file.ext'
> address@hidden mvtest]# ls
> moveto
> address@hidden mvtest]#
>
> This is wrong as the destination file should not be overwritten when using
> --reply=no
Thanks for the report.
However, you are misunderstanding the admittedly
unclear description of --reply=no. That is why the --reply=...
option is being deprecated and will be removed in an upcoming release.
With --reply=no, mv declines to do the "move" operation
only in those unusual cases (i.e., read-only target) in which
it would have prompted you.