Last active
August 20, 2020 15:34
-
-
Save colegleason/2a2cdfe4285b88964c321b8f6e19dea6 to your computer and use it in GitHub Desktop.
Zip all subdirectories that are older than a year old, remove source files after zip
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
find . -type d -mtime +365 -maxdepth 1 -exec zip -mr {}.zip {} \; |
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
rsync --remove-source-files -ah --info=progress2 *.zip /Volumes/Shared\ Data/Code\ Backup |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment