Closed polluks closed 2 months ago
The info we need is total disk space, used disk space, and the percentage used. Haiku df doesn't provide enough info.
Sorry, I don't see the point
$ a=232.9; b=219.6; a=${a%.*}; b=${b%.*}; c=$((a - b))
$ echo $c / $b \($((c * 100 / a))%\)
13 / 219 (5%)
I don't like the inaccuracy from having to drop decimals, but I guess it's fine.
What is the full output from df -h /
?
Right now I have the source handy https://github.com/haiku/haiku/blob/master/src/bin/df.cpp BTW option h is just a dummy.
Got a VM running, output is wildly different so I had to write a parser just for it. I thought to manually calculate the decimal part, so no more inaccuracy. I also reworked the part that converts Digital UNIX/IRIX df output to human readable format to be able to display fractions, so that output should be better now. LMK if it works on your system.
perfect!
https://github.com/Un1q32/pfetch/blob/5424c5df74931387882cfa4001f633b45497d7f3/pfetch#L1231 I cannot see the oddness https://www.markround.com/blog/2023/02/13/haiku-package-management/#filesystem-layout