#!/bin/bashlocation=/root/rmfind $location -mtime +30 -print | xargs rm -rf //-mtime是距離上一次修改時間 -print是隻顯示文件 xargs是獲取find查找的結果在經過rm命令刪除bash