About a couple of days ago I needed to copy some files from other destination to the new destination and have the current destination overwritten .The reason I wanted to do that was because my Linux Centos server crashed and I didn’t have a new backup of some hosting accounts,So I had to restore their old backup to have some configuration backed up and then had to copy the new files to overwrite the old files such as mysql tables.When I wanted to copy I used the following with no luck of success

cp -r
cp -r -f
cp-Rf
cp-fr
cp -fR
cp -R -f

no one of these helped me out in this matter.
I searched into the google and I noticed in forums people have sugested to do those I thought command but I finally found the solution in a website ande i will share it with you
it is simply a 1 line written shell command actually to accept every overwrite by yes prevously

yes | cp /old/destination/* /new/destination

and you are now done
Hope this could be helpful for you Linux guys

Voshka Niknam

LEAVE A REPLY

Please enter your comment!
Please enter your name here

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