惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
D
Darknet – Hacking Tools, Hacker News & Cyber Security
N
News and Events Feed by Topic
N
News | PayPal Newsroom
SecWiki News
SecWiki News
P
Privacy International News Feed
T
Troy Hunt's Blog
Attack and Defense Labs
Attack and Defense Labs
N
News and Events Feed by Topic
L
LINUX DO - 热门话题
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Security Latest
Security Latest
AWS News Blog
AWS News Blog
S
Secure Thoughts
W
WeLiveSecurity
H
Heimdal Security Blog
T
Threat Research - Cisco Blogs
I
Intezer
Application and Cybersecurity Blog
Application and Cybersecurity Blog
S
Security @ Cisco Blogs
G
GRAHAM CLULEY
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Spread Privacy
Spread Privacy
L
Lohrmann on Cybersecurity
C
CERT Recently Published Vulnerability Notes
S
Security Affairs
Hacker News - Newest:
Hacker News - Newest: "LLM"
Google Online Security Blog
Google Online Security Blog
Cisco Talos Blog
Cisco Talos Blog
雷峰网
雷峰网
Cloudbric
Cloudbric
Y
Y Combinator Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园_首页
Hacker News: Ask HN
Hacker News: Ask HN
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Google DeepMind News
Google DeepMind News
Vercel News
Vercel News
云风的 BLOG
云风的 BLOG
Latest news
Latest news
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
D
Docker
Recent Announcements
Recent Announcements
博客园 - 【当耐特】
H
Help Net Security
博客园 - 司徒正美
TaoSecurity Blog
TaoSecurity Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
C
Check Point Blog
博客园 - 叶小钗

博客园 - Don

在Chrome中调试Android微信浏览器中的网页,不出现供选择页面的怎么办?(chrome://inspect/#devices) 使用Crontab集合sh脚本自动删除过期的Confluence Docker容器中的备份文件 Docker PHP中安装gd扩展并生成图形验证码 解决命令行提示“cannot create temp file for here-document: No space left on device”但磁盘使用率并未满的问题 SSH登录后提示LC_ALL: cannot change locale (en_US.UTF8) 的解决办法 解决git操作一直要求输入用户名和密码的问题 CentOS如何增加虚拟内存 RabbitMQ集群脑裂故障处理 Alibaba Centos ECS 安全更新记录 AWS EC2配置CloudWatch 记录AWS Linux2 的yum安全更新步骤 记录Docker系统盘空间占用过大的解决方法 AWS EC2 EBS数据盘挂载与相关日常维护操作 AWS Amazon Linux2 安装Docker和Docker Compose [转]提升 Docker Desktop For macOS 磁盘使用率 AndroidGetAPKInfo --- 检查包名(packageName)、版本(versionName\versionCode)、应用签名(Signature)等信息 - Don OpenSSL命令—pkcs12 Linux下User与Group的常用操作命令解析 Docker搭建openvpn - Don
zookeeper日志定时清理
Don · 2022-09-16 · via 博客园 - Don

创建zkclean.sh文件

#!/bin/bash

#snapshot file dir
dataLogDir=/docker/zookeeper/datalog/version-2
#transction file dir
dataDir=/docker/zookeeper/datalog/version-2

#保留最新的50个文件
count=50
count=$[$count+1]
##按照时间正序排列|展示从头开始第count行开始|传入执行参数
#事务日志
LOGNUM=`ls -l $dataDir/log.* |wc -l`
if [ $LOGNUM -gt 0 ]; then
    ls -t $dataDir/log.* | tail -n +$count | xargs rm -f
fi

#快照日志
SNAPSHOTNUM=`ls -l $dataLogDir/snapshot.* |wc -l`
if [ $SNAPSHOTNUM -gt 0 ]; then
    ls -t $dataLogDir/snapshot.* | tail -n +$count | xargs rm -f
fix 

给sh文件赋权限:

修改crontab并保存生效:

crontab -e
0 1 * * * /docker/zookeeper/zkclean.sh

posted @ 2022-09-16 16:06  Don  阅读(404)  评论()    收藏  举报