Mercurial > pdfconcat
diff bin/cleanup.cron @ 0:8f7e68d54c6d
initial commit: should be already usable
author | markus schnalke <meillo@marmaro.de> |
---|---|
date | Thu, 29 Aug 2013 13:58:17 +0200 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bin/cleanup.cron Thu Aug 29 13:58:17 2013 +0200 @@ -0,0 +1,14 @@ +#!/bin/sh +# +# print list of old files from the upload directory +# output is meant to be piped into: `xargs rm -f' + +if [ $# -lt 2 ] ; then + echo "usage: ${0##*/} NUM_OF_DAYS_TO_KEEP DIR..." >&2 + exit 1 +fi + +days="$1" +shift + +find "$@" -maxdepth 1 -mindepth 1 -atime +"$days" -print