linux磁盘使用率超过90%时清理应用log
#!/bin/bash#cleaning top two max applications' log reguarly when disk's usage exceeds 90%maxUsed=$(df -h|awk 'NR==8 {print $5}'|sed 's/%$//')std=90if [ "$maxUsed" -gt "$std" ];then
·
#!/bin/bash
#cleaning top two max applications' log reguarly when disk's usage exceeds 90%
maxUsed=$(df -h|awk 'NR==8 {print $5}'|sed 's/%$//')
std=90
if [ "$maxUsed" -gt "$std" ];then
echo > /home/sc/projects/lease-consumer/logs/tomcat_stdout.log
fi
更多推荐
已为社区贡献1条内容
所有评论(0)