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, by reading the output of:

man df

and one place to start with df itself might be

df -h


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'


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

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