diskalert.sh

#!/bin/bash #### ## Desc diskalert.sh ## Auth [email protected] ## Date 20190919 ## Usage bash diskalert.sh #### if [ `whoami` != cad ] then echo "pls run as cad user" exit 0 fi # while version while : do used=$(df -hT / | tail -n 1 | awk '{print $6}' | awk -F% '{print $1}') if [ $used -lt 80 ] then echo "$HOST this disk will be full" fi sleep 3600 done
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章