Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Title explains it;

Somehow in installing the 'z' directory jumper, I made our linux machines CP command act strangely (for example: it no longer prompts for overwrites, it auto-forces it whether we want it or not) - does anybody know how to revert my linux box's CP command back to its default setting?

share|improve this question
up vote 2 down vote accepted

Linux cp does not, by default, prompt you when overwriting. If it used to, then as @mirkobrankovic said, it was most likely defined as an alias.

User specific aliases are usually in ~/.bashrc and global aliases are in /etc/bash.bashrc. You probably had an alias in one of those files that turned cp into cp -i if you were asked before overwriting.

To set up that alias again, add this line to either of the two files I mentioned above:

alias cp='cp -i'

The alias will take effect next time you open a terminal window.

share|improve this answer

On modern linux systems, cp no longer prompts to overwrite file.
If it used to do that before, than you probably lost an alias.

alias cp='cp -i'

at the end of or /etc/bash.bashrc. Logout and log back in console to take effect.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.