Delete expire backup data after seven day
时间:
2018-01-09 11:41:05
阅读:
194
评论:
收藏:
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