linux系统磁盘使用情况
#!/bin/bash total_disk=`df -k | grep -v Filesystem | awk '{print int($2)}'` available_disk=`df -k | grep -v Filesystem | awk '{print int($4)}'` total=0 available=0 for t in $total_disk do total=$((total+t)); done for a in $available_disk do available=$((available+a)); done echo $total,$available