From b80c7287595b7bb340bc6281850654fe029aaaba Mon Sep 17 00:00:00 2001 From: Simon Cornet Date: Thu, 30 Nov 2023 18:38:17 +0100 Subject: [PATCH] [Proxmox] Added trim script --- Linux/proxmox/container_trim.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 Linux/proxmox/container_trim.sh diff --git a/Linux/proxmox/container_trim.sh b/Linux/proxmox/container_trim.sh new file mode 100644 index 0000000..863e1d3 --- /dev/null +++ b/Linux/proxmox/container_trim.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +# find container ids +containers=( $(pct list | awk -F " " '{print $1}') ) +containers=("${containers[@]:1}") + +# execute trim for each container +for container in "${containers[@]}"; do + pct fstrim $container +done