Last active
May 7, 2023 16:57
-
-
Save mariadanieldeepak/c311f7a151148d8802892d0c7ce2f0a7 to your computer and use it in GitHub Desktop.
List Files Modified X Days Ago
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
# Remove all files that were modified until two days ago. | |
find /path/to/directory -type f -mtime +2 -delete | |
# Remove all files in current directory. | |
find . -type f -mtime +2 -delete |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment