1.输出占用率超过60%的分区
df -h | awk 'BEGIN{print "Full Partition"}NR>1{gsub("%","",$5);$5+=0;if($5>=60){print $1"\t"$5}}'
2. 停止占用8080端口的進程
lsof -i: | awk 'NR!=1{print $2}' | xargs kill -sigkill
1.输出占用率超过60%的分区
df -h | awk 'BEGIN{print "Full Partition"}NR>1{gsub("%","",$5);$5+=0;if($5>=60){print $1"\t"$5}}'
2. 停止占用8080端口的進程
lsof -i: | awk 'NR!=1{print $2}' | xargs kill -sigkill