码迷,mamicode.com
首页 > 其他好文 > 详细

Delete expire backup data after seven day

时间:2018-01-09 11:42:28      阅读:133      评论:0      收藏:0      [点我收藏+]

标签:delete   not found   bin   ash   usr   after   -name   time   rgs   

#!/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

标签:delete   not found   bin   ash   usr   after   -name   time   rgs   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!