Cleanup Downloads Once a Week

The times they are a-changin’.

This post seems to be older than 6 years—a long time on the internet. It might be outdated.

Here’s an easy way to keep your Downloads folder clean, just paste these this into your cron file (with the appropriate scheduling):

find ~/Downloads -type f -maxdepth 1 -mtime +7 -exec rm {} \;
find ~/Downloads -type d -maxdepth 1 -mtime +7 -exec rm -r {} \;

Here’s the gist: https://gist.github.com/fergbrain/8ddda2108dbc497e9f6b

I use Cronnix to manage and edit cron jobs on my Mac.

0