cp: overwrite – force yes

Getting a bit peeved with the copy command prompting to overwrite files.

cp -rf ./* ./another/location/
cp: overwrite `/filename.conf’? y

The ‘-i’ interactive option is obviously aliases into the copy command on Centos (even the -f option was not overriding this for me) but a quick way of overriding the aliasing behaviour is to prefix the whole command with a backslash.
So:

cp -rf ./* ./another/location/

Becomes:

\cp -rf ./* ./another/location/

Leave a Reply

  • (will not be published)

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>