Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

2 Answers 2

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.
Add

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

 
discard

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.