How could I check total free storage capacity left on my system among multiple hdd's?

I have 15 SATA hard drives attached to my computer and having to go through them one by one, writing down the free space and then summing everything up is not ideal.

Is there a command or a combination of commands that could do that? Ideally where I could pass something like /dev/sd* since I do not want to include the nvme drives.


Solution 1:

EDIT: I should read man pages more often. It is as simple as

df --total -h /dev/sd*

Okay I figured out something

df --output=avail  /dev/sd* | tail -n +2 | datamash sum 1

What this basically does is listing mounted disks and displaying only the available space as output, then using tail for removing the first line which is the column title Avail then finally summing the numbers with datamash.