Last active
August 11, 2017 11:06
-
-
Save xuyuji9000/80a84a63d6a424b8d6089bcd5a45e9d1 to your computer and use it in GitHub Desktop.
Remove files with modification time more than 30 days ago.
This file contains hidden or 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 | |
find ./ -mindepth 1 -mtime +30 -exec rm '{}' \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
create test file to be removed
touch -t 01010101 test.file