sudo apt-get --purge remove nginxsudo apt-get autoremovedpkg --get-selections|grep nginx查看没删除干净的相关内容比如nginx-common没删掉的话,执行下面的方法sudo apt-get --purge re...
分类:
系统相关 时间:
2014-10-24 20:44:38
阅读次数:
340
查看逻辑CPU个数:#cat/proc/cpuinfo|grep"processor"|sort-u|wc-l24查看物理CPU个数:#grep"physicalid"/proc/cpuinfo|sort-u|wc-l2#grep"physicalid"/proc/cpuinfo|sort-uphysicalid:0physicalid:1查看每个物理CPU内核个数:#grep"cpucores"/proc/cpuinfo|uniqcpucores:6每个..
分类:
其他好文 时间:
2014-10-24 19:14:13
阅读次数:
200
需要统计用户日志信息,分析出用户行为时,用shell往往能方便地取出很多数据,取出后再放置到excel中统计。
例如:统计日志中含loadCustomProcess这个地址的访问,按访问耗时排序:
grep "loadCustomProcess" /home/workflow/socket.txt | awk -F " " '{print $11}'|awk -F ":" '{print $2...
分类:
系统相关 时间:
2014-10-24 16:43:13
阅读次数:
262
执行执行 phpize 报错:1 grep: /usr/include/php/main/php.h: No such file or directory2 grep: /usr/include/php/Zend/zend_modules.h: No such file or directory3 ...
分类:
Web程序 时间:
2014-10-24 14:18:46
阅读次数:
236
查看log:
cat /var/log/Xorg.0.log | grep EE[ 75.403] (EE) Failed to load module "modesetting" (module does not exist, 0)[ 75.403] (EE) Failed to load module "fbdev" (module does not exist, 0)[...
分类:
其他好文 时间:
2014-10-24 11:07:22
阅读次数:
259
一、安装Linux下安装方式有多种,可以利用包管理器自动安装,也可以自己手动编译源代码安装,此处采用比较简单的安装方式,利用apt-get:sudo apt-get install mysql-server安装完成后服务会自动启动。检测服务进程状态:ps -aux|grep mysql启动/关闭/重...
分类:
数据库 时间:
2014-10-23 22:25:30
阅读次数:
250
//杀掉某个进程-xargs应用ps aux | grep "udplog.js" | cut -c 9-15 | xargs kill -9//远程拷贝文件或文件夹sudo scp -P 22 /Volumes/info/test/* root@172.12.1.12:/data/shell///...
分类:
系统相关 时间:
2014-10-23 20:35:06
阅读次数:
235
1.行首与行尾字符^$
行首:
oyzhx@ubuntu:~$ grep -n '^the' regular_express.txt
12:the symbol '*' is represented as start.
行尾
oyzhx@ubuntu:~$ grep -n '\.$' regular_express.txt
1:"Open Source" is a good m...
分类:
其他好文 时间:
2014-10-23 12:29:00
阅读次数:
165
最近一直在研究shell脚本这块,刚好闲下来整了下自己手头上比较好的资料中的一些范例,以下是我整理的鸟哥私房菜里面正则表达式里面比较基础的一些语法详解,适合新手查阅。首先先复制一段范例:复制代码代码如下:# vi regular_express.txt------------------------...
分类:
系统相关 时间:
2014-10-23 12:19:46
阅读次数:
334
方法一通过yum自带的yumdownloader工具进行下载,这个工具是由yum-utils这个软件安装生成的执行如下命令,检查yum-utils是否存在:rpm -qa |grep yum-utilsyum -y install yum-utils*rpm -ql yum-utils执行如下命令进...
分类:
其他好文 时间:
2014-10-23 12:16:50
阅读次数:
418