From: Thierry Parmentelat Date: Mon, 4 Jul 2011 09:19:54 +0000 (+0200) Subject: get rid of the endless list of daily mails, log stuff in /root/.nightly-clean-trash... X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=ac1ef3a4f0d5d43e1003f0fb309d188e29c7cf44;hp=489b63ec1e3500abe58911b0a6ebfe3a8f011f62;p=infrastructure.git get rid of the endless list of daily mails, log stuff in /root/.nightly-clean-trash.log; it's not as if anybody cared --- diff --git a/scripts/nightly-clean-trash.sh b/scripts/nightly-clean-trash.sh index 11b2078..014806b 100755 --- a/scripts/nightly-clean-trash.sh +++ b/scripts/nightly-clean-trash.sh @@ -3,6 +3,11 @@ # -mtime +1 : older than one day # grep -v : preserve the top directory +exec >> /root/.nightly-clean-trash.log +exec 2>&1 + +date + [[ -n "$@" ]] && [ "$1" = "-n" ] && set -x todelete=$(find /build/trash -maxdepth 1 -mtime +1 -print | grep -v 'trash/*$')