Problem creating script to delete files older than 60 mins
ok so I have created a cron job to delete files older than 60 minutes that is set to run every 4 hours.
0 */4 * * * /home/falon/Enviviocron.sh
What is actually running in the script is "find /home/envivio/*/*.ts -daystart -maxdepth 1 -mmin +60 -type f -name "*.ts" -exec rm -r {}\;
for testing purposes I have changed "rm -r" to "ls -l"
The error that I get when I try to run the command manually is...
Find: paths must precede expression: ls
usage: find [-H] [-L] [-P] [-0level] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression]
What needs to be changed to allow this to run properly? Got to me something small I am over looking...
|