On one of my servers, I created a subdomain called “uploads,” serving as a temporary spot for files I want to share or transfer. However, this directory keeps expanding uncontrollably. To manage it, I wrote a Bash script that will run directly or as a cron job to remove files that have overstayed their welcome, specified in the script in days.
(more…)