xombboxer |
02-25-2015 04:28 AM |
Is it food have find command running in cron every day once to delete older files
I need to clean-up some folder. I have a cron job which uses find command to find and delete 25 days older file.
Code:
find $FOLDER_PATH/$FOLDER -depth -regex ^$FOLDER_PATH/$FOLDER/[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ -type d -mtime +25 -exec ls -ld {} \; >> /tmp/deleted_folders.log
When this running it occupies 1-3% of cpu. And it may take longer time based on the folder size.
Is it ok to have find command running as cron job ?
|