grep means "match"
Parameters commonly used in four
-I matching file contents ignoring case
-R recursive matching files (i.e., files in a layer-level directory)
-N Indicates the line number of the matched row displayed in the file
-h (added by default when using grep alone) displays the file path and file name to match to
--color=auto highlight the matched string in the matched row
General use:
Grep-irnh or Grep-irn
Grep-irnh "Line" *//starting with the string in this level directory or from the directory contained in this level directory and displaying the row number of the document in which it is located
Grep-irnh--color=auto "Line" *//start matching and highlighting the string from this level directory or from the directory contained in this level directory and display the row number of the document in which it is located.
------------------------------Correlation Matching Find--------------------
Using find to implement a match
Find. -name "*.ctl"-print |xargs grep "line"//"." Indicates that this level directory-name represents a document that ends with a CTL, and then matches the line string in the contents of these documents and prints it on the screen
The grep of a Linux command---1