From 24b6a1197031a41f26371a2a3e3cb646d261d5a9 Mon Sep 17 00:00:00 2001 From: Sam Whited Date: Sun, 26 Jul 2015 09:31:20 -0500 Subject: [PATCH] Add a cronjob example to remove old files --- contrib/crontab.example | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 contrib/crontab.example diff --git a/contrib/crontab.example b/contrib/crontab.example new file mode 100644 index 0000000..f8d5b7c --- /dev/null +++ b/contrib/crontab.example @@ -0,0 +1,5 @@ +# Every day at 03:00 remove all files older than 30 days. See the man find note +# on -atime for rounding error information. If you'd rather only remove files +# that haven't been accessed for 30 days (and you don't have your drive mounted +# with the noatime option), use -atime instead. +0 3 * * * * find /var/www/blobstorage -ctime +30 -type f -exec rm -f \{\} \; >/dev/null 2>&1