千家信息网

Delete expire backup data after seven day

发表于:2025-01-23 作者:千家信息网编辑
千家信息网最后更新 2025年01月23日,#!/bin/bashpath=/usr/localfind ${path:-/tmp} -name ".tar.gz" -type f -mtime +7 | xargs rm -rfretal=$
千家信息网最后更新 2025年01月23日Delete expire backup data after seven day

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

0