bug-coreutils
[Top][All Lists]
Advanced

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

bug#70887: In coreutils 9.5, "cp" command does not honor "--interactive"


From: Robert Hill
Subject: bug#70887: In coreutils 9.5, "cp" command does not honor "--interactive" option
Date: Sun, 12 May 2024 15:25:14 +0000

Pádraig, Thank you very much indeed for responding so quickly and thoroughly.
As you suggest, instead of "cp -Tipruvx ..." I am now using "cp -Tpruivx ..."
("-i" after "-u"), which works just fine. Many thanks, and kind regards, Bob.

________________________________
From: Pádraig Brady <pixelbeat@gmail.com> on behalf of Pádraig Brady 
<P@draigBrady.com>
Sent: Sunday, May 12, 2024 11:49
To: Robert Hill <hill-robert@hotmail.com>; 70887@debbugs.gnu.org 
<70887@debbugs.gnu.org>
Subject: Re: bug#70887: In coreutils 9.5, "cp" command does not honor 
"--interactive" option

On 12/05/2024 00:03, Robert Hill wrote:
> After upgrading coreutils from 9.0 to 9.5, the following change occurred:
>
> In coreutils 9.0, the command "cp -Tipruvx /src-dir /dst-dir" requested
> interactive confirmation before replacing an old destination file with a
> newer source file, as expected.
>
> In coreutils 9.5, the command "cp -Tipruvx /src-dir /dst-dir" no longer
> requests interactive confirmation, but just goes ahead and replaces old
> destination files with newer source files, which is not expected.
>
> Thank you in advance for looking at this, Bob.

Right.

The thinking was for 9.3 that the new long form --update={older,all} options
would override a previous -i, especially as -i was commonly set in root
users' cp and mv aliases on Red Hat flavored distros.
Then in 9.5 we expanded this so -u behaved the same as --update=older.

In retrospect, users can avoid these aliases in various ways,
and the protective -i option should really combine with -u
rather than being overridden by it.

For completeness, -i following -u would always reinstate the protection.

The attached changes the behavior back to that -i is never overridden.

thanks,
Pádraig


reply via email to

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