"${FIND} ${BKUP_PATH} -maxdepth 1 -type f -mtime +30 -delete"dazed wrote: I ended up putting this script
in etc/cron.daily. I then ran the script in this directory....and I believe it deleted all my daily.crons... I thought my directory had about a dozen things in it...but after I believed it deleted all because older than 30 days..
I suggest you got very lucky there. ONLY losing the contents of cron.daily
I suspect you didn't set "BKUP_PATH" correctly in the script, so "find" ran against the current directory (/etc/cron/daily) and as you surmise, blew away everything older than 30 days. Possibly "BKUP_PATH" was blank (not set).
I don't see a problem putting this script in cron.daily -- I too put general scripts I've added in /usr/local/bin (or /usr/local/sbinfor system stuff) -- but I don't think the location of the script is the problem. You may need to post your actual script, in full, for someone to comment on the exact tiny-but-significant error!