Last active
January 12, 2018 09:08
-
-
Save hadl/8330988 to your computer and use it in GitHub Desktop.
Delete PNGs older than 30 days
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
# more info: http://www.vionblog.com/linux-delete-files-older-than-x-days/ | |
find . -type f -name '*.png' -mtime +30 -exec rm {} \; | |
# better use delete flag :) | |
find . -type f -name '*.png' -mtime +30 -delete; | |
# use -mmin instead of -mtime for minutes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment