Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disable interactive switch for CP

Status
Not open for further replies.

SelbyGlenn

Technical User
Oct 7, 2002
444
GB
Hi there,

Under Redhat the -i switch is enabled by default with the "cp" command. How do I disable this so I am no longer prompted to overwrite existing files?

Thanks in advance,

Glenn
BEng MCSE CCA
 
Is there a non-interactive switch then? If so, couldn't you just alias that to the cp so that it works non-interactively by default. May be well off the map here, mind you!
 
Unfortunately not. There's only an -i (interactive) switch which is being set by a script somewhere

Glenn
BEng MCSE CCA
 

I found the fix KenCunningham. It's the /root/.bashrc file that has an alias in it for the "cp" command. Hashed that out and it works a treat!

Just thought you might like to know.

Cheers,

Glenn
BEng MCSE CCA
 
Glenn,

much appreciated. All too often threads disappear into the ether without a satisfactory response because people work it out for themselves and don't post back. Thanks again and well done! Regards.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top