磁盘空间使用状况检测脚本
时间:2014-09-10 18:36 来源:linux.it.net.cn 作者:it
磁盘空间使用状况检测---
复制代码代码如下:
#!/bin/bash
IP=`ifconfig eth0|sed -n '2p'|awk '{print $2}'|cut -c 6-`
SPACE=`df |sed -n '/\/$/p'|awk '{print $4}'|sed 's/%//'`
if [ $SPACE -ge 90 ];then
echo "The / disk is full"
fi
(责任编辑:IT)
磁盘空间使用状况检测---
复制代码代码如下:
#!/bin/bash
(责任编辑:IT)IP=`ifconfig eth0|sed -n '2p'|awk '{print $2}'|cut -c 6-` SPACE=`df |sed -n '/\/$/p'|awk '{print $4}'|sed 's/%//'` if [ $SPACE -ge 90 ];then echo "The / disk is full" fi |