linux
小立攻城狮
这个作者很懒,什么都没留下…
展开
-
linux替换文件内容
使用sed命令 1、替换test.txt文件中的hello为hello world set -i 's/hello/hello world/g' test.txt 2、替换当前目录下的所有文件中的hello为hello world set -i 's/hello/hello world/g' ls原创 2015-03-11 09:36:05 · 2799 阅读 · 2 评论 -
Linux常用命令
1、查找进程>ps -ef|grep ngbs //查找ngbs的进程 2、杀掉进程>kill -9 750 //杀掉进程ID为750的进程 3、查看端口>netstat -an|grep 18786 4、解压gz包>gunzip -cd xx.tar.gz|tar -xvf- 5、解压tar包>tar -xvf xx.tar 6、压缩tar包>tar -cvf logs.tar log原创 2015-02-13 12:29:33 · 412 阅读 · 0 评论