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 <noreply@anthropic.com>
This commit is contained in:
rob
2026-02-07 10:24:13 +00:00
parent 413ca7ccd4
commit c8f96a3a39

View File

@@ -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