Answers for "bash script check if enough available disk space"

0

bash script check if enough available disk space

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;
Posted by: Guest on July-15-2021

Code answers related to "bash script check if enough available disk space"

Browse Popular Code Answers by Language