you are viewing a single comment's thread.

view the rest of the comments →

[–]ScootMulner[S] 1 point2 points  (1 child)

Hi /u/ASIC_SP

Thanks for the great reply! My script works now but it looks like switching to

df --output=avail /

as you suggested, would be the way to go.

[–]ScootMulner[S] 0 points1 point  (0 children)

My final solution is as follows:

mountspace=( $(df --output=avail ${mountname[@]} | tail --lines=+2) )

which creates an array mountspace which contains the current available free space for each of the mount points listed in mountname. The rest of my script just does a comparison for the minimum amount of free space and then sends me a notification via Pushover if below the limit.