Red Hat Bugzilla – Bug 16336
cp -f does not force
Last modified: 2008-05-01 11:37:57 EDT
Doing a copy with the force flag '-f' does nothing.
*** Bug 16337 has been marked as a duplicate of this bug. ***
As root, cp is aliased to 'cp -i', so when you type 'cp -f ...' it's actually
doing a 'cp -i -f ...'.
But it worked in RedHat 6.2.
Should the force not take priority?
Other users should also have "alias cp='cp -i'"
The new behaviour is valid. Its certainly not desirable however
Doing a `rm -i -f` does force.
Thus it is expected from `cp -i -f` as well.
The cp from fileutils-4.0z has this:
-f, --force if a preexisting destination file cannot be opened, then unlink it
and try again
--remove-destination unlink each preexisting destination file before attempting
to open it (contrast with --force)
Check the fileutils changelog - it is intended behavior because of POSIX