find ./ -type f -mtime +7 -exec rm -f {} \;
-mtime +n means strictly greater than, -mtime -n means strictly less than
Last active
January 15, 2018 15:52
-
-
Save ansrivas/c0f877a1bcbaf0a7b2f1fb81e7e68486 to your computer and use it in GitHub Desktop.
Using find to delete files older than sometime
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment