Monday, November 26, 2007

find old files

Delete all tar.gz files in $BDIR older than $DAYS:
find $BDIR -name \*.gz -ctime +$DAYS -exec rm '{}' \;
My backup script wasn't cleaning things correctly. The above did the trick. The find command is interesting.

No comments: