上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 94 下一页
摘要: Wireshark: https://www.wireshark.org/ 安装: apt-get install wireshark 教程: http://blog.csdn.net/leichelle/article/details/8184500 http://blog.csdn.net/le 阅读全文
posted @ 2016-10-26 22:55 小 楼 一 夜 听 春 雨 阅读(885) 评论(0) 推荐(0)
摘要: os.path.abspath(path) #返回绝对路径 os.path.basename(path) #返回文件名 os.path.commonprefix(list) #返回list(多个路径)中,所有path共有的最长的路径。 os.path.dirname(path) #返回文件路径 os 阅读全文
posted @ 2016-10-26 22:22 小 楼 一 夜 听 春 雨 阅读(7548) 评论(0) 推荐(2)
摘要: http://linuxtools-rst.readthedocs.io/zh_CN/latest/tool/crontab.html 19. crontab 定时任务 通过crontab 命令,我们可以在固定的间隔时间执行指定的系统指令或 shell script脚本。时间间隔的单位可以是分钟、小 阅读全文
posted @ 2016-10-25 00:54 小 楼 一 夜 听 春 雨 阅读(9677) 评论(0) 推荐(0)
摘要: LIBRARY_PATH和LD_LIBRARY_PATH是Linux下的两个环境变量,二者的含义和作用分别如下: LIBRARY_PATH环境变量用于在程序编译期间查找动态链接库时指定查找共享库的路径,例如,指定gcc编译需要用到的动态链接库的目录。设置方法如下(其中,LIBDIR1和LIBDIR2 阅读全文
posted @ 2016-10-24 16:28 小 楼 一 夜 听 春 雨 阅读(16765) 评论(0) 推荐(1)
摘要: ldd 查看程序依赖库 示例:查看test程序运行所依赖的库: /opt/app/todeav1/test$ldd test libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00000039a7e00000) libm.so.6 => /lib64/li 阅读全文
posted @ 2016-10-24 16:17 小 楼 一 夜 听 春 雨 阅读(3786) 评论(0) 推荐(0)
摘要: 函数:string.join() Python中有join()和os.path.join()两个函数,具体作用如下: join(): 连接字符串数组。将字符串、元组、列表中的元素以指定的字符(分隔符)连接生成一个新的字符串 os.path.join(): 将多个路径组合后返回 一、函数说明 1、jo 阅读全文
posted @ 2016-10-24 00:07 小 楼 一 夜 听 春 雨 阅读(7642) 评论(0) 推荐(0)
摘要: __new__() 函数只能用于从object继承的新式类。 先看下object类中对__new__()方法的定义: class object: @staticmethod # known case of __new__ def __new__(cls, *more): # known specia 阅读全文
posted @ 2016-10-23 22:20 小 楼 一 夜 听 春 雨 阅读(23496) 评论(5) 推荐(6)
摘要: from pexpect import pxsshhost = '192.168.80.139'user = 'allen'password = 'allen'command = 'df -h'def connect(hostname, username, password): try: s = p 阅读全文
posted @ 2016-10-23 00:55 小 楼 一 夜 听 春 雨 阅读(1659) 评论(0) 推荐(0)
摘要: 1). Linux系统首先要开启SSH服务:service ssh status 如果没安装的话,则要:apt-get install openssh-server service ssh restart 2). pip install paramiko example 1: import para 阅读全文
posted @ 2016-10-23 00:12 小 楼 一 夜 听 春 雨 阅读(16754) 评论(0) 推荐(1)
摘要: Windows: 先要安装python,确定将python的安装目录下面的python.exe加入到环境变量。点击环境变量 -> 点击PATH -> 在最后面加上我们的Python安装路径 -> 点击确定。 1). 首先安装easy_install 下载地址:https://pypi.python. 阅读全文
posted @ 2016-10-22 02:02 小 楼 一 夜 听 春 雨 阅读(3026) 评论(0) 推荐(0)
上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 94 下一页