From 4929bd62b3bbf2b555e9b3efa478f26dce07b98e Mon Sep 17 00:00:00 2001 From: Chris White Date: Thu, 12 Dec 2024 00:08:14 +0000 Subject: [PATCH] Quickly free up space with perl --- src/ci/scripts/free-disk-space.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/ci/scripts/free-disk-space.sh b/src/ci/scripts/free-disk-space.sh index 3164f9d947f8..3407ecf4008b 100755 --- a/src/ci/scripts/free-disk-space.sh +++ b/src/ci/scripts/free-disk-space.sh @@ -6,11 +6,8 @@ # ====== fast_rmdir() { -if [[ -d "$1" ]] && [[ -n "$1" ]] && [[ ! "$1" = "/" ]] && [[ ! "$1" = "~" ]]; then - echo "Removing directory: $1" - sudo find "$1" -type f -delete -print | wc -l - sudo rm -rf "$1" -fi + cd "$@" + perl -e 'for(<*>){((stat)[9]<(unlink))}' } list_installed_dpkg() {