Created
February 6, 2021 18:51
-
-
Save koveseb/e55b7a931c3a6e0056814323acdcaf24 to your computer and use it in GitHub Desktop.
Delete files older than x 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
#!/bin/bash | |
echo 'Days old:' | |
read days | |
find * -mtime +$days -exec rm {} \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment