Matching Control
-i :Ignore case 忽略大小写
-w:whole words 按照整个单词匹配
-v:Invert the sense of matching, to select non-matching lines 匹配不包含指定关键字的行
Output Line Prefix Control
-n:line number 在行前显示行号
Context Line Control
-A NUM:Print NUM lines of trailing context after matching lines. 显示关键字所在行的后NUM行
-B NUM:Print NUM lines of leading context before matching lines. 显示关键字所在行的前NUM行
-C NUM:Print NUM lines of output context 显示关键字前后NUM行
General Output Control
-c :print a count of matching lines 打印匹配关键在所在行的个数