Last active
December 25, 2022 18:31
-
-
Save debuglevel/92dd29a0486354803b74d0ea7b9d3378 to your computer and use it in GitHub Desktop.
Compress old files (e.g. logs)
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
# Compress all | |
# ... files | |
# ... older than 30 days | |
# ... not already compressed | |
find . -mtime +30 -type f -not -name "*.xz" -exec xz {} \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment