Using cp Command without Interaction

There’s a reason why cp is aliased to cp -i in _root’s_ .bashrc and .cshrc/.tcshrc.
After all, do you really want root to be able to overwrite a file without checking?
There is a way around the problem that retains the copy protections in root’s shell. Here’s how:

\cp -f

Backslashing the command temporarily avoids the alias done in the shell but does not permanently remove the protection.

g33kadmin

I am a g33k, Linux blogger, developer, student and Tech Writer for Liquidweb.com/kb. My passion for all things tech drives my hunt for all the coolz. I often need a vacation after I get back from vacation....

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.