In a Jenkins job, I have a build step executing shell commands like this:
rm -rf /var/www/www.example.com/*
find . \( -not -path '*/.svn/*' \) -exec cp -rv {} /var/www/www.example.com \;
However every time files in those folders such as .../classes/.svn/props are still copied.
I checked the find command manual, and the command seems correctly formed. So why is it not working? Also what is the purpose of putting a semicolon at the end? I copied this from somewhere :-)
I spent a few hours on this and still cannot get it work, so painful. Maybe using rsync is a better choice.