-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
Description
When copying an old file over a new file, cp still needs to ask: -u
is --update=older
, which according to the man page only influences which files are considered for overwriting. In other words, -u
does not work by automatically allowing anything, but rather by disregarding some copy actions.
Minimal example:
$ touch old; sleep 2; touch new; echo N | LC_ALL=C cp -i -u new old
cp: overwrite 'old'? [$? = 1]
$ touch old; sleep 2; touch new; echo N | cargo run cp -i -u new old
$
Found while trying to fix #4725.