linux
文章平均质量分 72
warrior_zhang
这个作者很懒,什么都没留下…
展开
-
python 利用selenium模拟登录帐号验证网站并获取cookie
python 利用selenium模拟登录帐号验证网站并获取cookie 1.安装selenium package:2.引入selenium package, 建立webdriver对象:3。打开设定的url,并等待response:4.通过xpath找到登录框,并填入相应帐号密码,模拟点击登录:5.验证登录成功与否,若currenturl发生变化,则认为登录成功:6.通过对象的方法获取当前访问网站的session cookie:7.得到cookie之后,就可以通过urllib2访问相应的网原创 2015-12-06 21:44:39 · 32047 阅读 · 4 评论 -
find the install path of some software in linux (ubuntu)
find the install path of some software原创 2016-01-12 13:02:25 · 381 阅读 · 0 评论 -
manage .deb package in linux (ubuntu) dpkg
manage .deb package in ubuntu install a source package原创 2016-01-12 13:02:27 · 298 阅读 · 0 评论 -
some package command in linux (ubuntu) zip/ tar/ tar.gz/ tar.bz2
<1> zip 我们可以使用下列的命令压缩一个目录: 点击(此处)折叠或打开 zip -r archive_name.zip directory_to_compress 下面是如果解压一个zip文档:点击(此处)折叠或打开 unzip archive_name.zip <2> tar 打包一个目录:点击(此处)折叠或打开 tar -cvf archive_name.tar directory_to_compress原创 2016-01-12 13:02:30 · 391 阅读 · 0 评论 -
the shutdown command in linux for shutdown in time or reboot
最好是使用命令&将关机命令至于后台处理。不影响当前其它操作。设置多久时间后执行shutdown命令。时间参数有hh:mm或+m两种模式。hh:mm格式表示在几点几分执行shutdown命令。例如 “shutdown 10:45”表示将在10:45执行shutdown.+m表示m分钟后执行shutdown.比较特别的用法是以now表示立即执行shutdown. 值得注意的是这部分参数不能省略。另外,需要注意如果现在已经22:30,你执行了shutdown -h 22:00 & 那么第二天才会关机。原创 2016-01-12 13:02:35 · 394 阅读 · 0 评论 -
深入理解python之self
首先明确的是self只有在类的方法中才会有,独立的函数或方法是不必带有self的。self在定义类的方法时是必须有的,虽然在调用时不必传入相应的参数。 self名称不是必须的,在python中self不是关键词,你可以定义成a或b或其它名字都可以,但是约定成俗,不要搞另类,大家会不明白的。下例中将self改为myname一样没有错误: 点击(此处)折叠或打原创 2016-01-12 13:02:56 · 3616 阅读 · 0 评论 -
ubuntu mentohust solutions summary
1.Mentohust 认证出现的问题及解决方法汇总问题一:“MentoHUST - 系统提示 在网卡xxx上获取IP失败!”如果学校使用动态分配ip的话,这个提示可以不用管。如果使用静态ip,则说明你的ip设置错误,到“系统——首选项——网络连接”中修改你的ip。确定正确后,就可以继续了。问题二:“MentoHUST - 系统提示 用户静态IP类型绑定错误!”这是由于D原创 2016-01-12 13:03:02 · 548 阅读 · 0 评论 -
搭建spark cluster网络设置,ipv6关闭,ipv4设置,DNS设置
搭建spark cluster网络设置,ipv6关闭,ipv4设置,DNS设置1. 虚拟机之间ping不通2. 网卡重启3. 关闭ipv64. ipv4 地址设置原创 2015-12-06 21:40:41 · 2347 阅读 · 0 评论 -
resolv.conf设定DNS被重置解决办法
设置在resolv.conf设置DNS只是临时办法,设置长期DNS可在/etc/resolvconf/resolv.conf.d/base中设置,如下:sudo vi /etc/resolvconf/resolv.conf.d/base加入如下方式的内容:nameserver xxx.xxx.xxx.xxx或者通过设置网卡来实现,设置/etc/network/interfaces 方法如下原创 2015-12-07 12:10:57 · 10136 阅读 · 0 评论 -
ubuntu (linux) 中的进程状态查询与管理 top/htop/ps/pgrep/kill
1.一个简单粗暴的指令,显示进程信息,并显示内存,内核,等的占用情况--top:2.htop是top的升级版,通过如下指令安装:3.ps 是一个只查看进程状态的指令,可根据需要加入一下显示参数:4. grep 根据进程名字,获得对应PID,指令格式:pgrep processname5.kill 关闭指定进程:原创 2015-12-14 16:00:27 · 3902 阅读 · 0 评论 -
build makefile for my coding!!
I learn how to build makefile from below:http://www.chinaunix.net/old_jh/23/408225.htmlhttp://blog.chinaunix.net/uid-23089249-id-2855999.htmlThis is my first makefile demo!!It's so simple an原创 2016-01-12 13:00:32 · 415 阅读 · 0 评论 -
My understand of "iptables"
I learn the iptables when I want to set the firewall in ubuntu.First : The iptables is one tool which is used to set the "netfilter" by user or system. like the image below: Secon原创 2016-01-12 13:00:34 · 386 阅读 · 0 评论 -
shell 编程语法总结(I/O 逻辑控制结构)
FIRST:control structure 1CONDITION--if The Form: if [ expression ] then command elif [ expression ] then原创 2016-01-12 13:00:37 · 400 阅读 · 0 评论 -
My start of git
1install git: in my ubuntu "sudo apt-get install git"2git command: Generate git repository git init : initial a git repository Add file into git repository git add fil原创 2016-01-12 13:00:53 · 278 阅读 · 0 评论 -
linux command solution for problems
1.find the install path of some software manage .deb package in ubuntu some package command原创 2016-01-12 13:02:22 · 242 阅读 · 0 评论