#!/bin/sh #备份天数 Days=1; #文件类型 File="txt"; #删除目录 FILE_PATH="./"; find ${FILE_PATH} -name "*.${File}" -type f -mtime +${Days} -exec rm -rf {} \;