摘要:
#coding=utf-8 importsys,os,os.pathimportpdb#只获得第一层子目录,过滤非目录文件 defgetsubdocs(path=None):doclist=[]if(os.path.isdir(path)):foriteminos.listdir(path):ifitem!='.svn':ifos.path.isdir(path+os.sep+item):doclist.append(item)returndoclist#获得所有层级子目录,过滤非目录文件 defgetallsubdocs(path=None):#pdb.set_trace() 阅读全文
摘要:
一段常用db备份脚本 1 #!/bin/bash 2 ### create by yunfei.heyf 3 ### program for backup mysql with mysqldump 4 5 6 BAKDIR="/home/admin/backup" 7 DUMPCMD="/usr/bin/mysqldump -uroot -h127.0.0.1 -pnothing --default-character-set=utf8 --databases " 8 BAKDB="tm" 9 BAKSET="daily_& 阅读全文