nonamer66 — 2013-06-09T14:41:59-04:00 — #1
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.
scallioxtx — 2013-06-09T14:49:21-04:00 — #2
rm -rf /path/to/destination/* && cp -r /path/to/source/* /path/to/destination/
nonamer66 — 2013-06-09T20:02:36-04:00 — #3
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.