Hello I use cpanel to set corn job . I want to delete my website files in files folder . To delete file every 60 mins ...... Now I set " find /home/rapid911/public_html/files/ -mmin +60 -exec rm {} \; " Does it right ? Please help me ! Thanks !
The command line looks correct, but I would use -execdir instead of -exec for safety reasons. Before setting up a cron job, be sure to create a test directory, put some files there and run the command to see how it works. EDIT: you should enclose braces in single quote marks, like this: find /home/rapid911/public_html/files/ -mmin +60 -exec rm '{}' \;
you could also maybe use a php script using http://php.net/manual/en/function.rmdir.php and let the cron call that it would be safe too this way