![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
linux
eryou_979
这个作者很懒,什么都没留下…
展开
-
centos防火墙
查看防火墙状态 firewall-cmd --state 或 systemctl status firewalld 开启防火墙 systemctl start firewalld 关闭/禁用防火墙 systemctl stop firewalld systemctl disable firewalld原创 2022-02-09 10:21:43 · 566 阅读 · 0 评论 -
Vm centos 同步主机时间
hwclock --hctosys原创 2021-09-09 09:20:25 · 199 阅读 · 0 评论 -
Linux-脚本、tailf
脚本后台+tail相关原创 2021-07-12 11:14:57 · 136 阅读 · 0 评论 -
清理postgresql归档日志并统计
两个脚本:arc_clean.sh、echo_log.sh。 可以把echo_log.sh加入定时。 arc_clean.sh(echo_log.sh用到) #!/bin/bash find /mnt/data/pg_archive -type f -ctime +1 -delete echo_log.sh(会生成clean.log) #!/bin/bash # 删除一天前的日志,两小时执行一次,统计清理的数据量 ARC_PATH=/mnt/data/pg_archive/ LOG_PATH=/mnt/d原创 2021-07-09 15:26:42 · 1069 阅读 · 0 评论 -
tailf日志脚本
tailf日志脚本,观察最新日志 SELF_LOG_PATH='/home/zf/track_trip_kafka/logs/debug/' SELF_FILE_NAME=$(find $SELF_LOG_PATH -type f -atime 0 -name '*log' -printf '%f\n' | sort -r | head -1) tailf $SELF_LOG_PATH$SELF_FILE_NAME原创 2021-07-06 10:10:19 · 132 阅读 · 0 评论 -
linux统计文件数量
管道过滤的文件,文件权限开头为- ls -l|grep ^-|wc -l原创 2021-07-02 09:17:13 · 38 阅读 · 0 评论 -
linux-shell获取时间
tailf -20 logs/debug/*`date +%Y-%m-%d`*原创 2021-06-18 20:26:10 · 48 阅读 · 0 评论