![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Linux
y1247179601
这个作者很懒,什么都没留下…
展开
-
linux shell脚本检测硬盘磁盘空间以及清理 邮件告警
以下为学习内容,也参考了网上的代码,并把我的调试好的结果展示出来,希望和我一样的新入门同学一些参考。 #! /bin/bash percent=` df -h | awk '{if (NR>2){print $5""$6}}'|cut -f 1 -d '%' ` #loc=` df -h | awk '{if (NR>1){print $6}}'` loc=` df...原创 2019-05-22 15:09:56 · 1474 阅读 · 2 评论 -
Hosts做解析配置,加定时任务
怎么用脚本向hosts文件加域名解析? /etc/hostsparse.sh #!/bin/bash filepath='/etc/hosts' chmod -R a+x ${filepath} if [ ! -e ${filepath} ];then echo "${filepath} not exist" else echo "9.25.177.7 gitlab.inner.yue...原创 2019-07-31 12:37:50 · 230 阅读 · 0 评论