FREE=`df -k --output=avail "$PWD" | tail -n1` # df -k not df -h if [[ $FREE -lt 10485760 ]]; then # 10G = 10*1024*1024k # less than 10GBs free! fi;