摘要: UserParameter=sshd,sudo awk '/PasswordAuthentication/{if ( $2 == "no" ) {print "OK"} else {print "NOT OK"}}' /etc/ssh/sshd_configUserParameter=sshdroo... 阅读全文
posted @ 2017-10-24 19:02 G-Large 阅读(251) 评论(0) 推荐(0)
摘要: os.mkdir() #创建单层目录,目录存在抛出异常os.makedirs() #创建多级目录os.rmdir() #删除单层目录os.removedirs() #递归删除目录,从子目录到父目录逐层删除,遇到非空目录,抛出异常os.remove(path) #删除文件os.rename(old,... 阅读全文
posted @ 2017-10-24 19:02 G-Large 阅读(101) 评论(0) 推荐(0)
摘要: s为字符串s.isalnum() #所有字符都是数字或者字母,为真返回Ture,否则返回Falses.isalpha() #所有字符都是字符返回True,否则返回Falses.isdigit() #所有字符都是数字返回True,否则返回Falses.islower(0 #所有字符都是小写返回True... 阅读全文
posted @ 2017-10-24 19:02 G-Large 阅读(184) 评论(0) 推荐(0)
摘要: random#生成随机字符 阅读全文
posted @ 2017-10-24 19:02 G-Large 阅读(73) 评论(0) 推荐(0)
摘要: print(help())#帮助文档help(list) print(dir())#列表形式打印内建方法 print(vars())#字典形式打印内建方法 type()#查看类型 import os#导入 reload(os) id()#查看系统内存存在ID位 ------------... 阅读全文
posted @ 2017-10-24 19:02 G-Large 阅读(165) 评论(0) 推荐(0)
摘要: import reimport urllib.requestimport randomimport osimport http.serverimport http.clientfrom urllib.error import URLError, HTTPErrorimport urllib.pars... 阅读全文
posted @ 2017-10-24 19:02 G-Large 阅读(3746) 评论(0) 推荐(0)
摘要: 查看从库报错 Last_SQL_Error: Could not execute Update_rows event on table bbs.cdb_myposts_21; Can't find record in 'myposts_21', Error_code: 1032; handler e... 阅读全文
posted @ 2017-10-24 19:02 G-Large 阅读(143) 评论(0) 推荐(0)
摘要: apache启动的时候,后面是空白,不会显示OK,将本文的内容替换覆盖就OK了注:文中的apache安装目录需要手动更换#!/bin/bash## Licensed to the Apache Software Foundation (ASF) under one or more# contribu... 阅读全文
posted @ 2017-10-24 19:02 G-Large 阅读(172) 评论(0) 推荐(0)
摘要: 由于公司需要把机房所有机器迁移到阿里云ESC上,顺便写个禅道迁移禅道版本:开源版8.2.4系统版本:cent os6.5 64bit一、停用禅道服务,把web服务停掉,或者把域名解析停掉,防止数据不一至二、同步禅道目录到新服务器上面(使用rsync)注意:不要只同步web访问目录,要把整个zenta... 阅读全文
posted @ 2017-10-24 19:02 G-Large 阅读(618) 评论(0) 推荐(0)
摘要: 由于公司需要把机房所有机器迁移到阿里云ESC上,顺便写个confluence迁移confluence版本是5.4破解版系统版本centos6.5 64bit一、首先确认在源服务器上confluence安装的路径,一共两个目录,如果你安装的时候是默认安装的,应该在/var/atlassian /opt... 阅读全文
posted @ 2017-10-24 19:02 G-Large 阅读(678) 评论(0) 推荐(0)