Last active
August 29, 2016 04:35
-
-
Save meysampg/dad68561c639ec3c5675dd83901921c6 to your computer and use it in GitHub Desktop.
Remove Old Backup Folders
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Replace PATH_OF_BACKUP_FOLDER with path of backup folder, for example /mnt/CRM/backup | |
# Replace NUMBER_OF_DAYS with a positive integer, for example 14 means folder older that 14 days. | |
find PATH_OF_BACKUP_FOLDER -maxdepth 1 -type d -ctime +NUMBER_OF_DAYS -printf "'%p' \n" | xargs rm -rf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment