+# df progress
+# usage: dfp MOUNTPOINT [SECOND_INTERVAL]
+# SECOND_INTERVAL defaults to 90
+dfp() {
+ # mp = mountpoint
+ local a b mp interval
+ mp=$1
+ interval=${2:-90}
+ if [[ ! $mp ]]; then
+ echo "dfp: error, missing 1st arg" >&2
+ return 1
+ fi
+ while true; do
+ a=$(df --output=used $mp | tail -n1)
+ sleep $interval
+ b=$(df --output=used $mp | tail -n1)
+ printf "used mib: %'d mib/min: %s\n" $(( b /1000 )) $(( (b-a) / (interval * 1000 / 60 ) ))
+ done
+}
+