Chinaunix首页 | 论坛 | 博客
  • 博客访问: 483969
  • 博文数量: 104
  • 博客积分: 3045
  • 博客等级: 少校
  • 技术积分: 1230
  • 用 户 组: 普通用户
  • 注册时间: 2008-02-29 10:18
文章分类

全部博文(104)

文章存档

2011年(72)

2010年(1)

2009年(1)

2008年(30)

分类:

2011-03-02 10:18:02

-R, -r, --recursive
	      Read all files under each directory, recursively; this is equiv-
	      alent to the -d recurse option.
-i, --ignore-case
	      Ignore  case  distinctions  in  both  the	 PATTERN and the input
	      files.
  -n, --line-number
	      Prefix each line of output with the line number within its input
	      file.
-C NUM, --context=NUM
	      Print  NUM lines of output context.  Places a line containing --
	      between contiguous groups of matches.
常见的查找有
grep -rin content *
grep -ric content * 列出数目
 -c 只输出匹配行的计数
-i 不区分大小写(用于单字符)
 -n 显示匹配的行号 
-v 不显示不包含匹配文本的所以有行 
-s 不显示错误信息
-E 使用扩展正则表达式
 -r 递归


阅读(634) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~

chinaunix网友2011-03-05 16:57:18

很好的, 收藏了 推荐一个博客,提供很多免费软件编程电子书下载: http://free-ebooks.appspot.com