
shell
shell脚本开发记录
Bestest~
学习 分享 交流 记录 成长
展开
-
shell定时删除tomcat日志和nginx日志信息补充
第一篇:https://blog.csdn.net/CEVERY/article/details/107672677 脚本完善、监控文件系统磁盘的使用情况进行清理,达到70%,未达到则不清理,直接退出。 补充主要如下: ```powershell used=`df -h | grep /dev/vda1 | awk '{print $5}'` echo "-------------------- 1. start exec the shell ----------------------- " if原创 2021-03-16 15:45:23 · 188 阅读 · 0 评论 -
shell定时删除tomcat日志和nginx日志信息
一、shell脚本 #!/bin/bash . /etc/profile . ~/.bash_profile process_name=java tomcat_path=/usr/local/tomcat nginx_path=/usr/local/nginx pid= `ps -ef | grep $process_name | grep -v grep | awk '{print $2}'` echo $pid if [ -n "$pid" ]; then { echo "-原创 2020-07-29 18:58:50 · 225 阅读 · 0 评论