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 diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/bin/cleanup.cron Thu Aug 29 13:58:17 2013 +0200 1.3 @@ -0,0 +1,14 @@ 1.4 +#!/bin/sh 1.5 +# 1.6 +# print list of old files from the upload directory 1.7 +# output is meant to be piped into: `xargs rm -f' 1.8 + 1.9 +if [ $# -lt 2 ] ; then 1.10 + echo "usage: ${0##*/} NUM_OF_DAYS_TO_KEEP DIR..." >&2 1.11 + exit 1 1.12 +fi 1.13 + 1.14 +days="$1" 1.15 +shift 1.16 + 1.17 +find "$@" -maxdepth 1 -mindepth 1 -atime +"$days" -print