set $(date) #remove old files #find all files under /backup/backup older than 4 days, and delete find /backup/backup -type f -mtime +4 | xargs rm -f #find all files newer than FILE, and delete find /backup/backup -type f -newer /backup -exec rm \{\} \;