From 53bd2e83d0a41678650ef5342567dee53857a15a Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Wed, 25 Jul 2012 12:51:21 +0200 Subject: [PATCH] [scripts] add external script that handles packages cache cleanup (using a simple MRU strategy) --- scripts/cleanup_pkgcache.sh | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100755 scripts/cleanup_pkgcache.sh diff --git a/scripts/cleanup_pkgcache.sh b/scripts/cleanup_pkgcache.sh new file mode 100755 index 0000000..57bf129 --- /dev/null +++ b/scripts/cleanup_pkgcache.sh @@ -0,0 +1,6 @@ +#!/bin/sh +# Remove tarballs not accessed in the last 30 days +# concurrency wrt scripts is handled in crontab + +DIR="/sabayon/pkgcache" +find "${DIR}" -atime +30 -type f -delete