杀掉多个进程 ps -ef | grep tornado_service | grep -v grep | cut -c 9-15 | xargs kill -s 9 清空内存缓存 echo 3 > /proc/sys/vm/drop_caches 查找大文件或目录 du -s * | sort -...
分类:
系统相关 时间:
2014-10-21 21:05:20
阅读次数:
224
1.查找被占用的端口 ????????? netstat?-tln ?? ????????? netstat?-tln?|?grep?8083?? ?netstat -tln 查看端口使用情况,而netstat -tln | grep 8083 则是只查看端口8083的使用情况...
分类:
其他好文 时间:
2014-10-21 20:01:29
阅读次数:
146
################################################### #!/bin/bash #判断进程是否存在,如果不存在就启动它 PIDS=`ps -ef |grep myprocess |grep -v grep | awk ‘{print $2}‘` if [ "$PIDS" != "" ]; then echo...
分类:
系统相关 时间:
2014-10-21 20:00:40
阅读次数:
288
1.作用Linux系统中grep命令是一种强大的文本搜索工具,它能使用正则表达式搜索文本,并把匹配的行打印出来。grep全称是GlobalRegularExpressionPrint,表示全局正则表达式版本,它的使用权限是所有用户。2.格式grep[options]3.主要参数[options]主要参数:-c:只输出匹配行的..
分类:
系统相关 时间:
2014-10-21 19:49:06
阅读次数:
373
有如下3种方式:grep -P "\t"awk '/1915848\t/'ctr+c 复制 一个.
分类:
其他好文 时间:
2014-10-21 19:16:45
阅读次数:
120
# Warning! Dangerous step! Destroys VMs for x in $(virsh list --all | grep instance- | awk ‘{print $2}‘) ; do virsh destroy $x ; virsh undefine $x ; done ; # Warning! Dangerous step! Removes lots o...
分类:
其他好文 时间:
2014-10-21 17:57:47
阅读次数:
173
在linux系统下可以通过cat /proc/cpuinfo来查看本机上cpu的相关信息,通过processor可以判断逻辑cpu的个数,physical id可以判断物理cpu的个数,通过cpu cores来判断每个cpu内的核数,通过siblings和cpu cores的对比可以判断是否支持超线程。
[oracle@sany1 ~]$ cat /proc/cpuinfo |grep ...
分类:
其他好文 时间:
2014-10-20 23:21:28
阅读次数:
276
编写脚本review.sh: #!/bin/bash
VERSION=`svn?log?-v?--stop-on-copy?$1?|?grep?-B4?"svn?copy"?|?head?-1?|?awk?‘{print?substr($1,2)}‘`
svn?di?-r?${VERSION}:head?$1 用法脚本后跟分支...
分类:
其他好文 时间:
2014-10-20 19:44:34
阅读次数:
194
当我们ssh,FTP到我们的远程的服务器的时候,我们想要提醒一下登入的用户,在用户本地显示我们自定义的警告信息,对用户进行提示下。ssh第一种方法:这中方法是我在网上搜到的,配置ssh服务的打开显示提示信息选项,默认为打开。[root@station25~]#grep"PrintMotd"/etc/ssh/ssh..
分类:
其他好文 时间:
2014-10-20 17:31:54
阅读次数:
161
根phpize很类似,可以用apxs为Apache打模块:要使用apxs,你的平台必须支持DSO特性, 而且Apache的httpd必须内建了mod_so模块。查看一下httpd -l | grep mod_so所有参数:[root@localhost]# apxsapxs -g [ -S name...
分类:
Web程序 时间:
2014-10-20 15:03:06
阅读次数:
265