pdfconcat

annotate 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
rev   line source
meillo@0 1 #!/bin/sh
meillo@0 2 #
meillo@0 3 # print list of old files from the upload directory
meillo@0 4 # output is meant to be piped into: `xargs rm -f'
meillo@0 5
meillo@0 6 if [ $# -lt 2 ] ; then
meillo@0 7 echo "usage: ${0##*/} NUM_OF_DAYS_TO_KEEP DIR..." >&2
meillo@0 8 exit 1
meillo@0 9 fi
meillo@0 10
meillo@0 11 days="$1"
meillo@0 12 shift
meillo@0 13
meillo@0 14 find "$@" -maxdepth 1 -mindepth 1 -atime +"$days" -print