#!/usr/bin/python#coding:utf-8import timeimport urllibimport urllib2from bs4 import BeautifulSoupimport reimport cookielibdef main0(): unix_timenow... Read More
posted @ 2015-10-17 20:48 超超xc Views(344) Comments(0) Diggs(0) Edit
1、systemd的服务管理程序:systemctl是主要的工具,它融合之前service和chkconfig的功能于一体。可以使用它永久性或只在当前会话中启用/禁用服务。systemctl可以列出正在运行的服务状态,如下:UNIT LOAD ACT... Read More
posted @ 2015-10-16 21:30 超超xc Views(4173) Comments(0) Diggs(0) Edit
CentOS 7.0发布过后,发现改了很多新东西,防火墙从iptables改成了firewall,MySQL改成了MariaDB,service已经被systemctl取代,SELinux也有一部分小改动,本次搭建的系统为未加入任何其他配置和安装,是最初环境,这一点至关重要。我们的配置目的是使授权用... Read More
posted @ 2015-10-16 16:53 超超xc Views(4185) Comments(0) Diggs(0) Edit
expecthi一种能够按照脚本内容设定的方式和交互程序进行“对话”的程序由于linux中的一些命令不太适合脚本化的自动运行,比如fdisk、telnet、ftp连接下载等,所以就必须使用expect来解决这些场景下的自动化运行问题。系统默认没有装ftp、expect命令,需要自己先进行yum安装(... Read More
posted @ 2015-10-16 00:35 超超xc Views(1077) Comments(0) Diggs(0) Edit
由于本机是刚装的centos7,默认并没有安装nc - netcat,所以下载了一个rpm包,安装时报错如下:[cos@localhost Desktop]$ lsnetcat-0.7.1-1.i386.rpm[cos@localhost Desktop]$ rpm -ivh netcat-0.7.... Read More
posted @ 2015-10-15 21:01 超超xc Views(7164) Comments(0) Diggs(0) Edit
检测服务器存活事日常运维工作中很重要也是很基础的服务监控服务,最简单的方法是使用ping命令检测.具体代码如下:#!/bin/bashTIMESTAMP=`date +%Y%m%d%H%M%S`CURRENT_HTML=/var/www/html/${TIMESTAMP}.htmlCURRENT_I... Read More
posted @ 2015-10-14 23:09 超超xc Views(426) Comments(0) Diggs(0) Edit
下载httpd-2.2.6.tar.bz2 把httpd-2.2.6.tar.bz2放到/soft 下[root@localhost ~]#cd /soft[root@localhost soft]#tar jxvf httpd-2.2.6.tar.bz2//解压apache的压缩包[root@lo... Read More
posted @ 2015-10-14 22:06 超超xc Views(163) Comments(0) Diggs(0) Edit
prep = 介系词;前置词,preposition的缩写 pron = 代名词,pronoun的缩写 n = 名词,noun的缩写 v = 动词,兼指及物动词和不及物动词,verb的缩写 conj = 连接词 ,conjunction的缩写 s = 主词 sc = 主词补语 o ... Read More
posted @ 2015-10-11 18:12 超超xc Views(780) Comments(0) Diggs(0) Edit
我们谈到“文本处理”时,我们通常是指处理的内容。Python 将文本文件的内容读入可以操作的字符串变量非常容易。文件对象提供了三个“读”方法: .read()、.readline() 和 .readlines()。每种方法可以接受一个变量以限制每次读取的数据量,但它们通常不使用变量。 .read()... Read More
posted @ 2015-10-02 16:39 超超xc Views(334) Comments(0) Diggs(0) Edit
用户管理是Linux系统维护的工作之一,其中设计用户添加、删除等简单操作.需求:一次添加很多用户.在一个文本文件中.格式:以行为单位,每行是一条用户信息.用户名和密码之间使用特定的分隔符分开,可是是空格,逗号,Tab键等。这里用空格区分eg:[rhat@localhost ~]$ cat addus... Read More
posted @ 2015-09-29 21:24 超超xc Views(1266) Comments(0) Diggs(0) Edit
I suppose,were childrenonec.