Report Current Free Space on a Hard Drive

Can Keyboard Maestro report free HD space?

For something to use in a KM Execute Shell Script action, you could start, in Terminal.app, by reading the output of:

man df

and one place to start with df itself might be

df -h

image

Or perhaps just the first N lines of its output, here, for example, the first 2 lines:

df -h | head -2

or just the second line:

df -h | sed -n '2 p'

etc

You could also narrow down on a particular column of a given line:

echo ${$(df -h | sed -n '2 p')[4]}