#!/bin/sh location="/data/backup/mysql/" #备份目录(7天以前) find $location -type f -name \*.sql -mtime +7 -exec rm {} \;