随笔分类 - grep
摘要:原文链接参考参考二算是正则环视的一个简单应用吧。http://pengqi.me/2011/05/%E4%BD%BF%E7%94%A8grep%E5%92%8C%E6%AD%A3%E5%88%99%E6%9D%A5%E5%88%86%E6%9E%90web%E6%9C%8D%E5%8A%A1%E5%99%A8%E6%97%A5%E5%BF%97/前两天因为第三方游戏服务器掉线,导致大量用户同时登录我的服务器,将服务器负载瞬间提高到200+,如此恐怖的数字让我不得不考虑增加服务器来抵抗问题重现,然而我的服务器平时负载都很低,0.1都不到,增加服务器来应付这样短暂的风暴未免太过于浪费,于是我决定从
阅读全文
摘要:如下用实际文件代替file11、查询file1里面空行的所在行号 grep -n "^$" stl_stable_sort.cc 参考:grep 常用命令2、查询file1以abc结尾的行 grep -n "^.*abc$" stl_stable_sort.cc 参考:正则表达式30分钟入门教程 grep 常用命令 3、打印出file1文件第1到第三行 sed -n '1,3'p stl_stable_sort.cc 参考:sed 指令简单使用二、如何将本地80端口的请求转发到8080端口,当前主机IP为192.168.2.1 三、cro
阅读全文
摘要:原文地址高亮显示grep include 或这个--include选项, 可以这样使用:grep -rn --include='*.c' --include='*.h' re .可以指定多次, 如果真是上面的这种情况, 其实可以用grep -rn --include='*.[ch]' re .但是, 如果源文件中含有C++源代码, 上面的方法就不凑效了, 因为[]中只能放一个字符.grep -rn --include='*.{cpp,h}' 也是不行的.此时需要不加引号的展开(由bash执行grep之前就已经完成, 可以通过set
阅读全文
摘要:find./-regex'.*\.\(cc\|h\|cpp\)'|xargsgrep-P--color=auto-R-n'\bReAddAll'-Pperl模式正则,无需字符转义--color=auto自动着色-n显示行号grep -R "wangkangluo" /var/www/html //所有目录文件下查找字符串比如,我想搜源码目录src下,包含“niuc”的所有ec文件find ./src -name '*.ec' -exec grep -iniuc {} /; -print在特定文件中grep某关键字,除了使用fi
阅读全文
搜索
积分与排名
- 积分 - 1028004
- 排名 - 366
随笔分类
- 电影(1)
- 163(1)
- 8700(1)
- ajax(6)
- android安卓(4)
- ant(1)
- apache(4)
- ape(8)
- api(2)
- apt(2)
- arm(4)
- asp(3)
- awk(6)
- bash(7)
- bat(1)
- boost(24)
- busybox(1)
- c(67)
- c#(3)
- c++(48)
- cast(1)
- chrome (1)
- cmd(76)
- cnblogs(2)
- const(2)
- cookie_session(1)
- cron(2)
- css(1)
- curl(2)
- cut(1)
- cvs(1)
- date(3)
- define(5)
- df(1)
- div(3)
- dll(1)
- dojo(1)
- doxygen(4)
- drupal(8)
- drupal7(3)
- du(1)
- effective(2)
- egg(1)
- emacs(15)
- env(1)
- exec(1)
- expect(1)
- explicit(1)
- extern(1)
- fastcgi(2)
- fcgi(2)
- fdisk(1)
- ffmpeg(1)
- find(3)
- firebug(3)
- firefox(2)
- flex(2)
- ftp(1)
- gae(2)
- gcc(2)
- gdb(9)
- git(13)
- glib(10)
- gmail(1)
- google(5)
- gprof(2)
- grep(4)
- gsoap(1)
- gtk(2)
- history(1)
- html(6)
- html5(3)
- http(2)
- ie(1)
- img(1)
- inotify(1)
- ip(3)
- iso(1)
- java(3)
- jdk(1)
- jquery(13)
- js(34)
- json(6)
- jsp(1)
- kill(1)
- kvm(1)
- lib(3)
- libevent(3)
- libjingle(2)
- linux(12)
- lisp(1)
- ln(1)
- log(2)
- log4c(3)
- log4cxx(1)
- lsof(1)
- ls指令(1)
- mail(2)
- makefile(14)
- malloc(1)
- maps(1)
- math(4)
- mcs51(4)
- mobaxterm(1)
- monitor(1)
- more(1)
- mount(3)
- msys(1)
- mutt(1)
- mysql(6)
- nat(2)
- nc(2)
- netstat(2)
- nexus(2)
- nfs (1)
- nginx(3)
- nm(1)
- nmap(2)
- nodejs(2)
- nosql(1)
- p2p(2)
- palm(3)
- perl(3)
- php(18)
- pkg(1)
- postgresql(3)
- pptp(6)
- profile(1)
- ps(1)
- putty(3)
- python(10)
- rails(2)
- raspberry树莓派(4)
- redis(1)
- rewrite(1)
- rhel(2)
- rm(4)
- rpc(1)
- rpm(1)
- rsync同步(2)
- ruby(6)
- samba(1)
- screen(1)
- sdk(1)
- sdl(1)
- sed指令(6)
- shell(16)
- sizeof(1)
- smarty(1)
- socket(5)
- soft(1)
- sort(1)
- sql(4)
- sqlite(3)
- ssh(8)
- ssh web(2)
- stl(11)
- string(4)
- svn(7)
- systemtap(1)
- tail(2)
- tar(2)
- telecom(1)
- template(4)
- time(1)
- tmux(3)
- tools(3)
- top(1)
- try(1)
- ubuntu(2)
- ulimit(1)
- uml(2)
- unix(6)
- valgrind(5)
- vim(13)
- virtual(1)
- vnc(2)
- vpn(1)
- vs(1)
- watch(1)
- wc(2)
- wcf(1)
- wget(1)
- win7(1)
- windbg(1)
- windows(1)
- wireshark(3)
- wordpress(1)
- x11(2)
- xampp(3)
- xargs(2)
- xml(3)
- yii(2)
- yum(1)
- zsh(1)
- 安防(2)
- 闭包(2)
- 编程原则(2)
- 编译原理(3)
- 程序内存结构(3)
- 更多