首页 > 其他 > 详细

Delete expire backup data after seven day

时间:2018-01-09 11:41:05      阅读:194      评论:0      收藏:0      [点我收藏+]
#!/bin/bash
path=/usr/local
find ${path:-/tmp} -name ".tar.gz" -type f -mtime +7 | xargs rm -rf
retal=$?
if [ $retal - eq 0 ];then
echo " the file "
.tar.gz" deleted ."
else
echo " Not found archive files."
fi

Delete expire backup data after seven day

原文:http://blog.51cto.com/546136/2058967

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!