Commit 769decbc authored by Nick Bearson's avatar Nick Bearson
Browse files

whoops, purging mtime didn't have the + in front of it

parent 468da055
......@@ -10,11 +10,11 @@ if [[ ! -d "$DIR" ]]; then DIR="$PWD"; fi
LOG=${LOGS}/purge.log
exec >> $LOG 2>&1
DAYS_TO_KEEP=64 # landsat repeats every 16 days, keep 4 cycles? seems like we have the disk space
DAYS_TO_KEEP=16 # landsat repeats every 16 days, keep 4 cycles? seems like we have the disk space
purge() {
find $1 -mtime ${DAYS_TO_KEEP} -type f -exec echo "PURGING: {}" \; -exec rm {} \;
find $1 -mtime ${DAYS_TO_KEEP} -type d -exec echo "PURGING: {}" \; -exec rm -r {} \;
find $1 -mtime +${DAYS_TO_KEEP} -type f -exec echo "PURGING: {}" \; -exec rm {} \;
find $1 -mtime +${DAYS_TO_KEEP} -type d -exec echo "PURGING: {}" \; -exec rm -r {} \;
}
purge $INCOMING
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment