I'm making a demo site for my visitors to test run my script. I need it to reset every hour. I've set up a cron job to do the database, but I'm wanting any changes done on the filesystem to be reverted too. So lets say I want to copy /source/ to /destination/ How do I remove any files from /destination/ before making a copy of the /source/ to the /destination/
I want the source to mirror the destination. I'm just not sure what cron command I need to make it happen.
rm -rf /path/to/destination/* && cp -r /path/to/source/* /path/to/destination/
thank you ScallioXTX. I really appreciate it and just wish I had asked on here first. I spent hours looking for the answer to this.
This topic is now closed. New replies are no longer allowed.