分类:
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=NUMPrint 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 递归
chinaunix网友2011-03-05 16:57:18
很好的, 收藏了 推荐一个博客,提供很多免费软件编程电子书下载: http://free-ebooks.appspot.com