From 645d29a26410e2e5fa1ec9db42bd536e6397022f Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Mon, 14 Sep 2015 01:47:14 +0200 Subject: [PATCH] mod_http_upload: Suggest cron jobs in README.txt Admins might want to set up cron jobs to remove old uploaded files. --- mod_http_upload/README.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/mod_http_upload/README.txt b/mod_http_upload/README.txt index fee962e..1654a82 100644 --- a/mod_http_upload/README.txt +++ b/mod_http_upload/README.txt @@ -164,3 +164,16 @@ The configurable mod_http_upload options are: This option specifies whether files uploaded by a user should be removed when that user is unregistered. It must be set to 'false' if this is not desired. + + + REMOVING OLD FILES + ------------------ + +You might want to use cron(8) to remove uploaded files that are older than +some number of days: + +0 1 * * * find /home/xmpp/upload -type f -ctime +365 -exec rm -f '{}' ';' +0 2 * * * find /home/xmpp/upload -type d -exec rmdir '{}' ';' 2>/dev/null + +Note that /home/xmpp/upload must be replaced with your actual 'docroot' +path, and 365 with the desired number of days.