摘要: 一、sed简介 sed是一种在线的编译器,它一次处理一行内容,将内容存储在临时的缓冲区中,接着用sed命令处理缓冲区的内容,处理完后将缓冲区的内容送往屏幕。(默认不更改原文件内容,除非使用重定向存储输出) 二、sed使用参数 格式:[root@www ~]# sed [-nefr] [动作] 选项与 阅读全文
posted @ 2017-04-09 22:19 漫舞沧海 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 一、grep简介 grep (global search regular expression(RE) and print out the line,全面搜索正则表达式并把行打印出来)是一种强大的文本搜索工具,它能使用正则表达式搜索文本,并把匹配的行打印出来。 grep家族包括:grep、egrep 阅读全文
posted @ 2017-04-09 22:13 漫舞沧海 阅读(255) 评论(0) 推荐(0) 编辑
摘要: 一、如何删除乱码文件(非包含中文字符文件) 阅读全文
posted @ 2017-04-09 22:08 漫舞沧海 阅读(92) 评论(0) 推荐(0) 编辑
摘要: 1、添加磁盘,查看磁盘状态 [root@zhongxin172 lib]# fdisk -l WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU 阅读全文
posted @ 2017-04-09 22:06 漫舞沧海 阅读(194) 评论(0) 推荐(0) 编辑
摘要: 一、vmware 常用命令 二、虚拟机卸载 1.先查看安装的虚拟机 vmware-installer -l 然后会显示版本和产品名称 Product Name Product Version vmware-workstation 7.0.1.227600 2.卸载虚拟机 sudo vmware-in 阅读全文
posted @ 2017-04-09 21:46 漫舞沧海 阅读(178) 评论(0) 推荐(0) 编辑
摘要: Install Wine 2.0 (Staging) via official Wine PPA: The official Wine PPA offers Wine-staging packages that are kinda different to the distro packages. 阅读全文
posted @ 2017-04-09 11:50 漫舞沧海 阅读(153) 评论(0) 推荐(0) 编辑
摘要: 1、字典的常用方法 print(myDict.iteritems()) <dictionary-itemiterator object at 0x7fa015db17e0> 二、使用zip函数, 把key和value的list组合在一起, 再转成字典(dict). 阅读全文
posted @ 2017-04-06 22:36 漫舞沧海 阅读(115) 评论(0) 推荐(0) 编辑
摘要: 1、master上生产公钥、私钥对 2、将公钥发送给slave,并追加到/root/.ssh/authorized_keys 文件中 3、master能够实现免密码SSH登陆slave 注意: 1、master采用 生成ssh-genkey 使用的账号登陆slave。 2、master将自己的公钥追 阅读全文
posted @ 2017-04-06 14:16 漫舞沧海 阅读(83) 评论(0) 推荐(0) 编辑
摘要: 1、str.find() /str.rfind()从左边或右边开始查找字符串 >>> str="hello world itcast itcastpython" >>> str.find("itcast") 12 >>> str.rfind("itcast") 19 >>> str.find("an 阅读全文
posted @ 2017-03-29 22:25 漫舞沧海 阅读(126) 评论(0) 推荐(0) 编辑
摘要: 1、列表值获取 2、列表简单运算操作 3、计算列表长度、最大值、最小值 4、list转换函数 5、删除列表中元素 6、列表常用方法 阅读全文
posted @ 2017-03-29 20:33 漫舞沧海 阅读(166) 评论(0) 推荐(0) 编辑