cp with force overwrite

I was recently trying to copy a directory over an existing one and kept getting prompted - asking if I wanted to overwrite existing files - even though I was using the force option:
cp -Rf dir1 dir2
I found the answer here - it was caused by an alias forcing the interactive mode.

Quick solution is to bypass the alias by an absolute reference to cp:
/bin/cp -Rf dir1 dir2



Popular posts from this blog

AspectJWeaver with JDK 7 - error - only supported at Java 5 compliance level or above

JUnit parameterized test with Spring autowiring AND transactions

Intellij tip - Joining multiple lines into one