[Git][qa/jenkins.debian.net][master] rdn: clean cache based on atimes

Holger Levsen (@holger) gitlab at salsa.debian.org
Mon May 12 13:53:54 BST 2025



Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net


Commits:
f56bda2f by Holger Levsen at 2025-05-12T14:53:43+02:00
rdn: clean cache based on atimes

Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -


1 changed file:

- bin/debrebuild_cache_limiter.sh


Changes:

=====================================
bin/debrebuild_cache_limiter.sh
=====================================
@@ -25,10 +25,9 @@ SIZE=$(du -sh $CACHE | grep G | cut -d 'G' -f 1||echo 0)
 
 if [ $SIZE -gt $LIMIT ] ; then
 	echo "$CACHE is still ${SIZE}G, reducing further."
-	# delete 1000 oldest files
-	# FIXME: use atime, but then, this script should not exist in the first place... :)
+	# delete 1000 files which have old access times
 	set -e
-	find $CACHE -type f -printf '%T+ %p\n' | sort | head -n 1000|cut -d ' ' -f2-|xargs sudo rm -f || true
+	find $CACHE -type f -printf '%A+ %p\n' | sort | head -n 1000|cut -d ' ' -f2-|xargs sudo rm -f || true
 	echo "checking again..."
 	$0
 else



View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/f56bda2f5f02a5a19f5998e287e18388d17c6a1d

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/f56bda2f5f02a5a19f5998e287e18388d17c6a1d
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/qa-jenkins-scm/attachments/20250512/64a5a37e/attachment.htm>


More information about the Qa-jenkins-scm mailing list