随便写了一个监控根磁盘空间的脚本。code=`df -k / | grep -v Available | awk '{print $5}' | awk -F% '{print $1}'`if [ $code -le 90 ]then echo "正常"else echo "不正常"fiexit 0