2019年5月29日

系统监控脚本-2

摘要: #!/bin/bash#获取主机名system_hostname=$(hostname | awk '{print $1}') #获取服务器IPsystem_ip=$(ifconfig eth0 |awk -F '[ :]+' 'NR==2{print $3}') #获取总内存mem_total=$ 阅读全文

posted @ 2019-05-29 11:17 明.Sir 阅读(232) 评论(0) 推荐(0) 编辑

linux根据时间过滤文件

摘要: 1、显示20分钟前的文件: find /sdb1/apache-tomcat-show/logs/ -type f -mmin +20 -exec ls -l {} \;2、删除20分钟前的文件: find /sdb1/apache-tomcat-show/logs/ -type f -mmin + 阅读全文

posted @ 2019-05-29 10:41 明.Sir 阅读(2704) 评论(0) 推荐(0) 编辑

导航