root@ip-192-0-1-205:/home/ubuntu# cat /root/remove_back.sh #! /bin/bash historyDir=/backupsmongodb/ find $historyDir -maxdepth 1 -type d -mtime +10 -exec rm -rf {} \;
删除10天前的备份文件
原文:http://www.cnblogs.com/dockers/p/7513034.html