get rid of the endless list of daily mails, log stuff in /root/.nightly-clean-trash...
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Mon, 4 Jul 2011 09:19:54 +0000 (11:19 +0200)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Mon, 4 Jul 2011 09:19:54 +0000 (11:19 +0200)
scripts/nightly-clean-trash.sh

index 11b2078..014806b 100755 (executable)
@@ -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/*$')