大马资讯论坛 - 马来西亚中文资讯平台

 找回密码
 注册
搜索

[教学] Cron Job 定时删除所有超过7天的file png

[复制链接]
发表于 2015-9-18 21:24:03 | 显示全部楼层 |阅读模式


出错 find: missing argument to `-exec' mtime cron job

  1. find /var/www/myapp/image -mtime +7 -name "*.png" -exec rm {} +
复制代码


就那么一句,超过7天的png,定时删除

手机版|大马资讯论坛  

GMT+8, 2024-3-28 21:29 , Processed in 0.022210 second(s), 13 queries , File On.

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表