From c8f96a3a39ae6222a5900218ec671277abd94f6e Mon Sep 17 00:00:00 2001 From: rob Date: Sat, 7 Feb 2026 10:24:13 +0000 Subject: [PATCH] show-size.sh: Add disk space info when called without args Shows free/total disk space at the end, similar to show-db-size.sh Co-Authored-By: Claude Opus 4.5 --- show-size.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/show-size.sh b/show-size.sh index 3e987be7..2ae6171d 100755 --- a/show-size.sh +++ b/show-size.sh @@ -60,3 +60,11 @@ dynamic=$(echo $(echo "$dynamic_kb * 1024" | bc) | numfmt --to=iec --suffix=B -- echo "Total static: $static" echo "Total: $total" echo "Dynamic: $dynamic" + +# Show disk space info when called without arguments +if [ $# -eq 0 ]; then + echo "" + vols_free=$(df -h /var/lib/docker/volumes | awk 'NR==2 {print $4}') + vols_total=$(df -h /var/lib/docker/volumes | awk 'NR==2 {print $2}') + echo "Disk space: ${vols_free} free / ${vols_total} total" +fi