More verbose cronjob output for debug

pull/73/head
jonsowman 2010-08-03 07:51:28 +00:00
rodzic e76d8d7e12
commit 43ed6426b5
1 zmienionych plików z 11 dodań i 1 usunięć

Wyświetl plik

@ -1,4 +1,14 @@
#!/bin/bash
find /var/www/hab/predict/predict/preds/* -type d -mtime +7 -exec rm -rf {} \;
PARAM="mtime"
AGE="7"
REPOROOT="/var/www/hab/predict/"
DATADIR="predict/preds"
echo `ls $REPOROOT$DATADIR/ -l | wc -l` "prediction scenarios found"
echo `find $REPOROOT$DATADIR/* -maxdepth 0 -$PARAM +$AGE | wc -l` "of them had $PARAM of more than $AGE days"
echo "Now deleting..."
find $REPOROOT$DATADIR/* -maxdepth 0 -$PARAM +$AGE -exec rm -rf {} \;
echo "DONE"