首页
Linux系统
Linux系统
Shell
常用开源软件
Linux进阶
Kubernetes
自动化和批处理
Devops
Python
云厂商
故障汇总
面试
路小飞
行动起来,活在当下
累计撰写
72
篇文章
累计创建
12
个标签
累计收到
0
条评论
栏目
首页
Linux系统
Linux系统
Shell
常用开源软件
Linux进阶
Kubernetes
自动化和批处理
Devops
Python
云厂商
故障汇总
面试
目 录
CONTENT
以下是
Shell
相关的文章
2025-03-26
发送机器人消息
给钉钉机器人发送消息 #!/bin/bash # Action: 测试curl发送信息给机器人 TOKEN1=123456123123 TOKEN2=qweqweqwe # webHOOK已脱敏 WEBHOOK_URL=https://oapi.dingtalk.com/robot/send?acc
2025-03-26
4
0
0
Shell
2024-10-31
服务更新脚本框架
#!/bin/bash # Author: x # Mail: 123@123.com # Action: updateApp # Mtime: 2024-10-31 # Version: v1 # 设置环境变量 codeName=app.tar.gz packDir=/usr/local/app
2024-10-31
19
0
0
Shell
2024-07-08
日志自动切割
#!/bin/bash # 配置参数 LOG_FILE="access.log" LOG_DIR="/home/webapp/logs" BACK_LOG_DIR="/home/webapp/logs/logs_back" MAX_SIZE=10485760 # 10MB RETENTION_D
2024-07-08
12
0
0
Shell
2024-06-27
监控 nginx 状态
#!/bin/bash nginx_status=`ps -C nginx --no-header |wc -l` if [ $nginx_status -eq 0 ]; then systemctl stop keepalived fi
2024-06-27
20
0
0
Shell
2024-06-25
SSH 密码输入错误超过五次拉黑
#! /bin/bash cat /var/log/secure|awk '/Failed/{print $(NF-3)}'|sort|uniq -c|awk '{print $2"="$1;}' > /opt/ssh-conn.info for i in `cat /opt/ssh-conn.i
2024-06-25
11
0
0
Shell
2024-06-25
定期备份MySQL数据库
#!/bin/bash # MySQL配置 USER="root" PASSWORD="yourpassword" DATABASE="yourdatabase" # 备份路径 BACKUP_DIR="/path/to/backup" DATE=$(date +"%Y%m%d%H%M") #
2024-06-25
27
0
0
Shell
2024-06-25
监控服务器磁盘空间并发送警报
#!/bin/bash # 设置阈值(以百分比表示) threshold=80 read -p "请输入要检查的磁盘:" DISK # 获取磁盘使用情况,并提取使用百分比 disk_usage=$(df -h |tail -n +2 | grep -i "$DISK" | awk '{ print
2024-06-25
19
0
0
Shell