首页 > 应用开发 > IT综合 > 监控某个目录使用情况的shell脚本
#! /sbin/sh -x
P=`bdf | grep /tmp|awk '{print $5}'|cut -c1-2
v="90"
if [ $P -gt $V ];then
rm -R /tmp/*
else
echo " /tmp is normal"
fi
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/15192459/viewspace-1009411/ ,如需转载,请注明出处,否则将追究法律责任。