我在那个删除cron上查了谷歌 - 我有:
17 13 * * * root find /backups/dslcart-* -mtime +6 -exec rm {} \;但它没有用,因为它应该用dslcart-(date)删除所有旧文件。 我不知道我在哪里可以出错?
任何见解将不胜感激。
I looked up google on that delete cron -- I have that:
17 13 * * * root find /backups/dslcart-* -mtime +6 -exec rm {} \;But it isn't working as it is supposed to delete all older files with dslcart-(date). I am not sure where I could go wrong with this?
Any insight would be appreciated.
最满意答案
为什么不写一个shell脚本甚至更简单,一个Perl脚本作为删除这些文件功能的理由? 这样,每次此事件触发时,您都可以更好地控制功能和输出。 这使您无需等待cron事件即可测试功能。 你只需从你的cron调用脚本。
Why not write a shell script or even easier, a Perl Script to act as your liason for the function of deleting those files? This way you have more control over function and output everytime this event fires off. And this allows you test your function without waiting on your cron events. You'll simply call the script from your cron.
更多推荐
发布评论