Linux – Turning off cp (copy) command’s interactive mode (cp : overwrite ?)

copycplinuxUbuntuubuntu-9.04

Does anyone know how I would turn off the interactive mode when using cp?

I am trying to copy a directory recursively into another and for each file that is getting overwritten I have to answer 'y'.

The command I am using is:

cp -r /usr/share/drupal-update/* /usr/share/drupal

But I get asked to confirm each overwrite:

cp: overwrite `./CHANGELOG.txt'? y  
cp: overwrite `./COPYRIGHT.txt'? y  
cp: overwrite `./INSTALL.mysql.txt'? y  
cp: overwrite `./INSTALL.pgsql.txt'? y  
...

I am using ubuntu server version jaunty.
Thanks!

Best Answer

Execute:

alias cp

To see if cp has been aliased to cp -i

In that case run:

\cp -r /usr/share/drupal-update/* /usr/share/drupal 

to ignore the alias