几个cpu
more /proc/cpuinfo |grep "physical id"|uniq|wc -l
每个cpu是几核(假设cpu配置相同)
more /proc/cpuinfo |grep "physical id"|grep "0"|wc -l
cat /proc/cpuinfo | grep processor...
分类:
系统相关 时间:
2014-11-02 16:35:41
阅读次数:
300
sed -i 's/10.1.1.1/10.1.1.2/g' `grep -ir 10.1.1.1 * |grep -E '.xml:|.cfg:|.ini:|.wsdl:|.properties:' | awk -F: '{print $1}' | uniq `注:当中1为原IP,2为新IP ;要...
分类:
系统相关 时间:
2014-11-02 12:05:10
阅读次数:
154
1. 查看物理CPU的个数#cat /proc/cpuinfo |grep "physical id"|sort |uniq|wc -l2. 查看逻辑CPU的个数#cat /proc/cpuinfo |grep "processor"|wc -l3. 查看CPU是几核#cat /proc/cpuin...
分类:
系统相关 时间:
2014-11-01 20:30:44
阅读次数:
182
uniq 命令 文字 uniq是LINUX命令 用途 报告或删除文件中重复的行。 语法 uniq [ -c | -d | -u ] [ -f Fields ] [ -s Characters ] [ -Fields ] [ +Characters ] [ InFile [ OutFile...
分类:
其他好文 时间:
2014-10-28 17:32:48
阅读次数:
193
??
一、从Map到Reduce
MapReduce其实是分治算法的一种实现,其处理过程亦和用管道命令来处理十分相似,一些简单的文本字符的处理甚至也可以使用Unix的管道命令来替代,从处理流程的角度来看大概如下:
cat input | grep | sort | uniq -c | cat > output
# Input -> Map -> Shuffle & Sort -> R...
分类:
其他好文 时间:
2014-10-26 17:06:35
阅读次数:
278
1.查看cpu个数cat /proc/cpuinfo |grep "physical id" |sort | uniq |wc -l22.查看cpu逻辑个数cat /proc/cpuinfo |grep "processor"|wc -l163.查看cpu核数cat /proc/cpuinfo |g...
分类:
系统相关 时间:
2014-10-26 13:06:47
阅读次数:
232
1.格式uniq [OPTION]... [INPUT [OUTPUT]]2.命令 -c, --count prefix lines by the number of occurrences -d, --repeated o...
分类:
系统相关 时间:
2014-10-21 17:29:14
阅读次数:
210
输出每个IP的网络连接数,是作很多事情的第一步:netstat -nat | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -nnetstat -nat|awk '{print $5}'|awk -F : '{print $1}'|aw...
分类:
其他好文 时间:
2014-10-19 12:50:34
阅读次数:
241
针对sql注入特征编写的sql防注入脚本visql.sh#!/bin/bashselect_union(){date=`date+%F\(%H:%M:%S\)`keyword=`grep-E‘select‘./access.log|grep-E‘union‘|awk‘{print$1}‘|sort|uniq`foriin$keyworddogrep‘\<‘$i‘\>‘ip.list&>/dev/null###白名单列表if[$?-eq0]then..
分类:
数据库 时间:
2014-10-17 18:58:25
阅读次数:
136
逛ChinaUnix论坛,常常可看到到日经帖,怎么快速排序一个文本内容,或者计算某行出现次数。这些问题大部分都可以通过简单的sort、uniq命令来解决。首先准备两个文本catfile1:BoysinCompanyC:HK:192:2192Alien:HK:119:1982TheHill:KL:63:2972Aliens:HK:532:4892StarWars:HK:301..
分类:
编程语言 时间:
2014-10-14 20:05:39
阅读次数:
347