cPanel 中的 Cron 作业将在 21 天后删除电子邮件
我在 21 天后删除电子邮件的 cron 作业中遇到一些问题。我已经阅读了很多示例,并尝试了该命令的许多不同变体,但我无法让它工作:
find /home/cont/mail///cur -name "*" - mtime +21 -exec rm {} \;
目前,它正在运行,我从文件夹中没有任何文件的每个邮箱中收到一条消息: “rm:无法删除`/home/cont/mail/example.com/admin/cur':是一个目录”
然后我检查其中确实包含文件的目录,并且没有删除任何内容。我确信我错过了一些简单的东西......
谢谢。
I'm having some issues with a cron job to delete emails after 21 days. I've read through many examples and have tried many different variations of this command but I can't get it to work:
find /home/cont/mail///cur -name "*" -mtime +21 -exec rm {} \;
Currently this runs and I get a message back from every mail box that doesn't have any files in the folder:
"rm: cannot remove `/home/cont/mail/example.com/admin/cur': Is a directory"
I then check the directories that do have files in them and nothing is deleted. I'm sure I'm missing something simple...
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我很高兴没有人回答这个问题,这让我看起来更愚蠢。它正在工作,返回的消息只是因为没有电子邮件,但我现在看到电子邮件已从其他用户的文件夹中删除。
I'm glad no one answered this and made me look even more stupid. It is working, the messages back are just because there are no emails but I am seeing the emails deleted from other user's folders now.