VFX/Bash-Scripts
stats
0%
0 Open
0 Closed
Updated 2025年05月01日 17:34:54 +02:00
-
Calculate storage device utilisation without df
mapfile < /proc/mounts
for index in ${!MAPFILE[*]}
do array=(${MAPFILE[$index]})
if [[ ${array[1]} == "/sysroot" ]]
then drive=${array##*/}
capacity=$(($(</sys/block/${drive//[0-9]}/${drive}/size)*512))
break
fi
done