Last active
January 2, 2022 04:11
-
-
Save rosylilly/b2cb046121e21520ec22ad6ae7fa449c to your computer and use it in GitHub Desktop.
Remove old download files(Full disk access to /usr/sbin/cron is required)
This file contains 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 | |
set -ex | |
find $HOME/Downloads -mtime +3 ! -type d -delete | |
find $HOME/Downloads -type d -empty -delete | |
# with cron | |
# * * * * * bash $HOME/bin/download-clear |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment