[xushi@dev gam]$ cat -A cleanup.sh #!/bin/bash$ $ # local backup area for it to store all the data$ DESTINATION="/var/www/html/gam/feeds"$ $ $ #How many backup days do you want to keep?$ KEEPBACKUP=2$ $ $ # --------------------------------------------------------------------$ $ # delete any old temp files$ echo "Cleaning up..."$ $ OLDBACKUPS=`find "$DESTINATION"/*.xml -maxdepth 0 -mtime +"$KEEPBACKUP"`$ for FILE in $OLDBACKUPS$ do$ echo Removing old file: $FILE$ echo rm $FILE$ done$ [xushi@dev gam]$