Chinaunix首页 | 论坛 | 博客
  • 博客访问: 457392
  • 博文数量: 108
  • 博客积分: 25
  • 博客等级: 民兵
  • 技术积分: 1134
  • 用 户 组: 普通用户
  • 注册时间: 2010-03-29 19:43
文章分类

全部博文(108)

文章存档

2016年(10)

2015年(9)

2014年(73)

2013年(16)

我的朋友

发布时间:2014-12-24 15:05:32

- lineinfile: dest=/etc/selinux/config regexp=^SELINUX= line=SELINUX=enforcing- lineinfile: dest=/etc/sudoers state=absent regexp="^%wheel"- lineinfile: dest=/etc/hosts regexp='^127\.0\.0\.1' line='127.0.0.1 localhost' owner=root group=root mode=0644- lineinfile: dest=/etc/httpd/conf/httpd.con.........【阅读全文】

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

发布时间:2014-11-25 14:08:39

点击(此处)折叠或打开#!/usr/bin/env pythonimport socketimport sysimport argparsedef main():        pa.........【阅读全文】

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

发布时间:2014-11-11 15:01:12

中午突然想起了如何比较2个IP是否在同一个subnet。简单的找了下 找到了Python的netaddr模块。基本的用法如下:点击(此处)折叠或打开>>> from netaddr import *>>> import pprint>>> ip=IPAddress('192.168.1.1')>>> ip.version4.........【阅读全文】

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

发布时间:2014-09-10 15:35:49

python 中正则的一点认识m.group()返回的是整个正则匹配的结果(tuple类型),m.groups()返回的是subgroup,也就是说正则里()的部分。m.group()!==m.groups(0) 下面是操作记录,环境:python 2.6点击(此处)折叠或打开>>> m.group()'24.1632'>>> m=re.match("(.........【阅读全文】

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

发布时间:2014-08-27 14:36:13

link 1 http://www.ibm.com/developerworks/cn/linux/l-oprof/link 2 http://www.oenhan.com/oprofile-cpu-analysislink 3 http://www.lenky.info/archives/2012/03/1371......【阅读全文】

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

登录 注册