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: Pádraig Brady
Subject: bug#70887: In coreutils 9.5, "cp" command does not honor "--interactive" option
Date: Sun, 12 May 2024 12:49:26 +0100
User-agent: Mozilla Thunderbird Beta

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

Attachment: cp-mv-i-u-prompt.patch
Description: Text Data


reply via email to

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