LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Force to copy files (https://www.linuxquestions.org/questions/linux-software-2/force-to-copy-files-154927/)

ust 03-08-2004 06:15 AM

Force to copy files
 
I want to overwrite some files from /tmp/temp1 to /tmp/temp2 , the command is "cp -r -f /tmp/temp1 /tmp/temp2 , both two paths contain nearly the same files , I only want to overwrite it , but when copying the files , it still prompt me to press "Y" even I add the "-f" , I use RH 8 Linux , could suggest what is wrong ? how to force to copy the files ? thx

trickykid 03-08-2004 07:30 AM

What happens if you just do a: cp -rf /tmp/temp1 /tmp/temp2 ?

I tested this on my own machine with -r and -rf and was never prompted for either.

dishawjp 03-08-2004 08:40 AM

There's a good chance that there's an alias in your .bashrc file that aliases rm to rm -i. This is often put into the root account to prevent "oopsies" that can do serious system damage. If it *really* bothers you, just remove the offending line from your .bashrc and hope you never make a bad typo.

Jim Dishaw


All times are GMT -5. The time now is 06:23 PM.