feat: Add disk_usage helper function

This commit is contained in:
Jeremy Wall 2024-08-11 09:42:01 -04:00
parent 7df09ad64a
commit 9087fabb66

View File

@ -35,3 +35,8 @@ function kill_service_on_port() {
kill -9 $p;
done
}
function disk_usage() {
local path=${1:-.}
/run/current-system/sw/bin/du --max-depth=1 -h "${path}" 2>/dev/null
}