grep pattern file
grep -i pattern file
ignore the uppercase/lowercase distinctions during comparisons.
grep -f pattern file
only the name of the file with mathing lines are listed (once)
grep -n pattern file
Each line is preceded by its relative line number in the file starting at 1.
This option is ignored if -c, -b, -l, or -q is specified.
====================================
find . -name 'abc'
====================================
grep命令详解
本文详细介绍了grep命令的各种用法,包括忽略大小写进行比较、仅列出匹配行的文件名、显示行号等选项,并展示了find命令查找文件名的具体语法。
950

被折叠的 条评论
为什么被折叠?



