Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3651567
  • 博文数量: 880
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 6155
  • 用 户 组: 普通用户
  • 注册时间: 2016-11-11 09:12
个人简介

To be a better coder

文章分类

全部博文(880)

文章存档

2022年(5)

2021年(60)

2020年(175)

2019年(207)

2018年(210)

2017年(142)

2016年(81)

发布时间:2019-03-05 16:38:18

Linux Bonding一、什么是bondingLinux bonding 驱动提供了一个把多个网络接口设备捆绑为单个的网络接口设置来使用,用于网络负载均衡及网络冗余二、bonding应用方向1、网络负载均衡对 于bonding的网络负载均衡是我们在文件服务器中常用到的,比如把三块网卡,当做一块来用,解决一个IP地址,流量过大,服务器.........【阅读全文】

阅读(13322) | 评论(0) | 转发(0)

发布时间:2019-03-01 13:53:30

[root@localhost /]# [root@localhost /]# cat ./for.py #!/bin/pythonfrom random import randintfrom itertools import chaina=[randint(10,100) for _ in range(20)]b=[randint(10,100) for _ in range(20)]c=[randint(10,100) for _ in range(20)]for n,m,v in zip(a,b,c):    print n+m+vcou.........【阅读全文】

阅读(14957) | 评论(0) | 转发(0)

发布时间:2019-02-26 10:53:31

[root@localhost /]# [root@localhost /]# cat split.py #!/bin/pythonimport res='aa,bb:cc;dd/tee<ff>gg'def mysplit(s,symbol):    t=[s]    for num in symbol:        res=[]        map(lambda x:res.extend(x..........【阅读全文】

阅读(4527) | 评论(0) | 转发(0)

发布时间:2019-02-25 17:18:32

[root@localhost /]# [root@localhost /]# cat strduiqi.py #!/bin/pythonimport os, statli=os.listdir('/software/script/shell')st=[n for n in li if n.endswith(('.sh','.py'))]for nm in st:    os.chmod(nm,os.stat(nm).st_mode | stat.S_IXGRP)[root@localhost /]# [root@localhost /]# .........【阅读全文】

阅读(1895) | 评论(0) | 转发(0)

发布时间:2019-02-25 16:57:05

[root@localhost /]# cat strduiqi.py #!/bin/pythonimport relog=open('/var/log/pacman.log').read()print re.sub('(\d{4})-(\d{2})-(\d{2})',r'\2/\3/\1',log)[root@localhost /]# 捕获组命名[root@localhost /]# cat strduiqi.py #!/bin/pythonimport relog=open('/var/log/pacman.log').read()print re.sub.........【阅读全文】

阅读(2518) | 评论(0) | 转发(0)
给主人留下些什么吧!~~
留言热议
请登录后留言。

登录 注册