disk usage

fdisk -l
shows me the total disk size.

How can I see, how much disk space is free or available?

man df

df
shows the how much space available at each mounted point.

I want to see total

Add them together. :slight_smile:

e.g., on Linux:

df -P | awk 'NR>1 {t+=$4} END { print "total available: " t }'

thanks for code,
I thought there would be an easier solution but anyway

you are thinking on simple case whreer you have only one hd and only one partition ...
when you take into acount LVMs, the diff tipes of RAIDs, even network filesystems, things get complicated anyways :stuck_out_tongue: