摘要: 我采用的是MySQLdb操作的MYSQL数据库。先来一个简单的例子吧:12345678910importMySQLdbtry:conn=MySQLdb.connect(host='localhost',user='root',passwd='root',db='test',port=3306)cur=conn.cursor()cur.execute('select * from user')cur.close()conn.close()exceptMySQLdb.Error,e:print"Mysql E 阅读全文
posted @ 2014-04-11 14:06 cdjiangchao 阅读(309) 评论(0) 推荐(0) 编辑
摘要: ·find path -option [ -print ] [ -exec -ok command ] {} \;find命令的参数;pathname: find命令所查找的目录路径。例如用.来表示当前目录,用/来表示系统根目录。-print: find命令将匹配的文件输出到标准输出。-exec: find命令对匹配的文件执行该参数所给出的shell命令。相应命令的形式为'command' { } \;,注意{ }和\;之间的空格。-ok: 和-exec的作用相同,只不过以一种更为安全的模式来执行该参数所给出的shell命令,在执行每一个命令之前,都会给出提示,让用户 阅读全文
posted @ 2014-04-11 13:36 cdjiangchao 阅读(364) 评论(0) 推荐(0) 编辑