The grep function of a linux Command per day is to find the content specified by PATTERN in a file or standard input. And display the row. Grep -- help can be used to view command parameters. The basic format is grep [OPTION]... PATTERN [FILE]... grep test file1. Search for test in file1. If file1 is replaced with-(minus sign) or is not written, it is the standard input. -E pattern is an extended regular expression. -F pattern is a fixed string and is not considered as a regular expression. -G pattern is a basic regular expression. -P pattern is a Perl regular expression. -E uses PATTERN as a regular expression. -F file1: Obtain the PATTERN from the file. -I ignore case sensitivity. Www.2cto.com-w. -X matches the entire row. -Z: a data row ends with 0 bytes instead of line breaks. -S does not display the error message. -V invert selection (list non-conforming rows ). -M n: a maximum of n matching results can be displayed. -B prints the byte offset in the result. -N: print the row number in the result. -H: print the file name in the result. (Mainly used to search for multiple files)-h does not display the file name. -O only displays the content that meets the conditions, rather than the whole line. -Q does not display any information. (Do not understand what this is for)-a does not ignore binary data. -I: Ignore binary. -D: used when the directory is to be searched. Parameters include 'read', 'recurse', or 'skip'-D. The parameters include 'read' or 'skip'-r-R recursive directory. -L list file names that do not match the specified template style. Www.2cto.com-l lists the file names that match the specified template style. -C: displays the number of qualified rows. -Z displays 0 bytes after the file. (Do not understand what it means)-B n displays the qualified rows and the first n rows. -A n: the rows that meet the conditions and the last n rows are displayed. -C n: displays the qualified rows and the n rows before and after the condition. -NUM is the same as-c num. Author: CrazyNemo