Forum Moderators: bakedjake
I need to remove all files and dir into /mydir/ any 60 minutes
I have setting thi on Cpanel cronjob
find /home/myuser/public_html/mydir/ -cmin +60 -exec rm -rf {} \;
It's ok, only problem is that dir /mydir/ is deleted :'(
?
thx
The * says only look at stuff inside mydir, not mydir itself. And the -depth should eliminate any file/directory not found errors.
txx
I have another question about it
I receive any hour a email: find: /myuser/public_html/mydir/*: No such file or directory
how tell with cron to not sent email IF files/dir not found?
I haven't receive notify about your reply on prev. thread