Created
June 3, 2020 21:01
-
-
Save giri-v/4926505a69a22d01e074bea8d262ca4e to your computer and use it in GitHub Desktop.
Automated "delete files older than" bash script
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/sh | |
echo "Starting cleaning old files..." | |
find [Path to search] -mtime +10 -type f -delete | |
echo "Finished cleaning old files..." | |
(sleep 1d;/bin/sh [Path to this file]/cleanoldfilesdaily.sh) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment