wget --http-user=username --http-passwd=password http:/www.***.com/*** -o newname
分类:
Web程序 时间:
2016-03-12 18:46:55
阅读次数:
175
1,打开终端, 设置root密码sudo passwd root输入密码 2, 安装 apachemac 自带apache 启动apachectl start重新启动apachectl restart关闭apachectl stop查看版本httpd -v
分类:
Web程序 时间:
2016-03-12 13:06:31
阅读次数:
225
语法:cut-d‘分隔字符’[-cf]n这里的n是正整数。c和f后和数字之间可以有空格,也可不用。-d后面跟指定分隔符,用单引号引起来。-f指定第几段,以分隔符为界限分段。-f后可以接一个数字,也可以接多个,用逗号连接。cat/etc/passwd|cut-d‘:‘-f2,3,4-c后接数字,表示截取第几个..
分类:
其他好文 时间:
2016-03-10 02:01:05
阅读次数:
308
一、Linux用户及用户组的基本概念用户:用户是实现能够将有限的资源在多个使用者之间进行分配;、用户组:用户组是指多个用户的集合,方便对一类需要同样权限的用户授权Linux是多用户、多任务的操作系统。多用户指:多人同时使用系统资源;多任务:同时运行多个进程二、用户及..
分类:
系统相关 时间:
2016-03-09 19:27:29
阅读次数:
324
命令行界面下的用户和组的管理之useradd和passwd命令的使用 useradd [-c comment] [-d dir] [-e expire] [-g group] [-G group1,group2...] [-m [-k skel_dir]] [-u uid] [-s shell] u
分类:
其他好文 时间:
2016-03-09 12:53:11
阅读次数:
198
把远程机器的文件,同步到本台服务器#!/usr/bin/expectsetpasswd"hd792310"spawnrsync-avzProot@192.168.11.70:/tmp/12.txt/tmp/expect{"yes/no"{send"yes\r"}"password:"{send"$passwd\r"}}expecteof注意:两台服务器都必须安装rsync,否则会报错expecteof必须有,表示结束。..
分类:
其他好文 时间:
2016-03-09 07:09:29
阅读次数:
176
再来看一个登陆后,执行命令然后退出的脚本:#!/usr/bin/expectsetuser"root"setpasswd"123456"spawnssh$user@192.168.11.18expect{"yes/no"{send"yes\r";exp_continue}"password:"{send"$passwd\r"}}#以上和上一个脚本相同expect"]*"send"touch/tmp/12.txt\r"expect"]*"send"e..
分类:
其他好文 时间:
2016-03-09 07:08:19
阅读次数:
131
Linux的scp命令可以实现两个主机之间的文件拷贝功能。 用python实现scp功能。 def run_scp(from1, to, passwd, log_file): cmd = "scp %s %s" % (from1, to) p = pexpect.spawn(cmd) if log_
分类:
编程语言 时间:
2016-03-08 16:22:51
阅读次数:
190
import MySQLdb conn = MySQLdb.connect(host='172.16.202.182',user='fengjian',passwd='123456',db='fengjian') cur = conn.cursor() sql = 'insert into admi
分类:
数据库 时间:
2016-03-07 13:32:18
阅读次数:
226
七. grep家族: 1. grep退出状态: 0: 表示成功; 1: 表示在所提供的文件无法找到匹配的pattern; 2: 表示参数中提供的文件不存在。 见如下示例: /> grep 'root' /etc/passwd root:x:0:0:root:/root:/bin/bash opera
分类:
系统相关 时间:
2016-03-07 11:55:18
阅读次数:
221