Mercurial > pdfconcat
annotate bin/cleanup.cron @ 1:6ea97e3f7cb5 default tip
ignore log and upload, because they change in a live setup
author | markus schnalke <meillo@marmaro.de> |
---|---|
date | Thu, 29 Aug 2013 13:59:09 +0200 |
parents | 8f7e68d54c6d |
children |
rev | line source |
---|---|
0
8f7e68d54c6d
initial commit: should be already usable
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
1 #!/bin/sh |
8f7e68d54c6d
initial commit: should be already usable
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
2 # |
8f7e68d54c6d
initial commit: should be already usable
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
3 # print list of old files from the upload directory |
8f7e68d54c6d
initial commit: should be already usable
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
4 # output is meant to be piped into: `xargs rm -f' |
8f7e68d54c6d
initial commit: should be already usable
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
5 |
8f7e68d54c6d
initial commit: should be already usable
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
6 if [ $# -lt 2 ] ; then |
8f7e68d54c6d
initial commit: should be already usable
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
7 echo "usage: ${0##*/} NUM_OF_DAYS_TO_KEEP DIR..." >&2 |
8f7e68d54c6d
initial commit: should be already usable
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
8 exit 1 |
8f7e68d54c6d
initial commit: should be already usable
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
9 fi |
8f7e68d54c6d
initial commit: should be already usable
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
10 |
8f7e68d54c6d
initial commit: should be already usable
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
11 days="$1" |
8f7e68d54c6d
initial commit: should be already usable
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
12 shift |
8f7e68d54c6d
initial commit: should be already usable
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
13 |
8f7e68d54c6d
initial commit: should be already usable
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
14 find "$@" -maxdepth 1 -mindepth 1 -atime +"$days" -print |