#!/bin/bash path=/usr/localfind ${path:-/tmp} -name ".tar.gz" -type f -mtime +7 | xargs rm -rf retal=$?if [ $retal - eq 0 ];then echo " the file ".tar.gz" deleted ."elseecho " Not found archive files."fi