#df -h | grep /dev/vda3
percent=`df -h | grep /dev/vda3 | awk '{print $5}' | head -2 | tail | grep -oP '\d+'`
echo ${percent}
if [ ${percent} -gt 80 ]
then
#echo "大于80%"
cd /home/fan/shell/
rm -f localhost_access_log.*
fi
shell定期删除日志文件
猜你喜欢
转载自blog.csdn.net/weixin_42562106/article/details/114834525
今日推荐
周排行