会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
yy9knsg
首页
管理
2024年11月14日
note centos初始化
摘要: 网卡编辑 /etc/sysconfig/network-scripts/ 目录下 BOOTPROTO="static" # 也就是将dhcp改为static ONBOOT=“yes” # 将网卡设置为开机启用 IPADDR=192.168.12.230 #静态IP GATEWAY=192.168.1
阅读全文
posted @ 2024-11-14 16:00 yy9knsg
阅读(17)
评论(0)
推荐(0)
2024年8月1日
OpenSSH升级到9.8脚本
摘要: #!/bin/bash # ######################################################### # Function :openssh-9.8p1 update # # Platform :Centos7.X # # Version :2.0 # #
阅读全文
posted @ 2024-08-01 15:03 yy9knsg
阅读(181)
评论(0)
推荐(0)
2023年12月14日
定时删除脚本 20231214
摘要: 保留最近7天的文件 #!/usr/bin/python # coding=utf-8 import os import datetime import logging def delete_old_files(directory): # 获取当前的日期和时间 current_time = datet
阅读全文
posted @ 2023-12-14 10:36 yy9knsg
阅读(49)
评论(0)
推荐(0)
2023年7月24日
notepad++主题配置
摘要: 
阅读全文
posted @ 2023-07-24 10:19 yy9knsg
阅读(65)
评论(0)
推荐(0)
2023年7月4日
docker 默认网段设置
摘要: `bip`配置,只会对docker0网桥生效 ```shell vim /etc/docker/daemon.json { "bip":"192.168.100.1/24" } ``` 较低版本的docker,不支持default-address-pools配置项,需要先升级Docker版本 def
阅读全文
posted @ 2023-07-04 15:13 yy9knsg
阅读(769)
评论(0)
推荐(0)
找出文件中重复出现最多的行
摘要: ```shell #查看第一列的所有数据并导出到1.log文件内 cat test.txt |awk -F ':' '{print $1}' > 1.log ``` ```python from collections import Counter # 读取文件内容并计算每一行的出现次数 with
阅读全文
posted @ 2023-07-04 09:47 yy9knsg
阅读(16)
评论(0)
推荐(0)
2023年7月3日
Firewall-cmd
摘要: ``` #禁止ICMP timestamp firewall-cmd --permanent --direct --add-rule ipv4 filter INPUT 0 -p ICMP --icmp-type timestamp-request -m comment --comment "den
阅读全文
posted @ 2023-07-03 16:02 yy9knsg
阅读(78)
评论(0)
推荐(0)
2023年6月16日
ssh配置pam登陆策略
摘要: ssh配置pam登陆策略 ### 1.pam下sshd配置文件问题  升级后openssh中的配置文件可
阅读全文
posted @ 2023-06-16 14:05 yy9knsg
阅读(343)
评论(0)
推荐(0)
升级OpenSSL OpenSSH --2023年6月15日
摘要: ``` 2023年6月15日 升级OpenSSL OpenSSH #查看openssh版本命令 ssh -V #查看openssl版本命令 openssl version 当前版本 [root@node01 ~]# ssh -V OpenSSH_7.4p1, OpenSSL 1.0.2k-fips
阅读全文
posted @ 2023-06-16 14:04 yy9knsg
阅读(274)
评论(0)
推荐(0)
2023年4月12日
python3 **解包
摘要: >>> d1 = {'name': 'apple'} >>> d2 = {'price': 10} # d1、d2 原始值不会受影响 >>> {**d1, **d2} {'name': 'apple', 'price': 10} >>> [1, 2, *range(3)] [1, 2, 0, 1,
阅读全文
posted @ 2023-04-12 15:25 yy9knsg
阅读(26)
评论(0)
推荐(0)
下一页