If you want to find "hello,world!" in the current directory String, you can do this:
Grep-rn "hello,world!" *: Indicates all files in the current directory, or it can be a filename
-R is recursive lookup
-N is the line number displayed
-R Find all files contain subdirectories
-I ignores case
Here are some interesting command line arguments:
Grep-i pattern Files: case-insensitive search. The default case is case-sensitive,
Grep-l pattern Files: Only the matching file names are listed,
Grep-l pattern Files: Lists mismatched file names,
Grep-w pattern files: matches only the entire word, not part of the string (such as matching ' magic ', not ' magical '),
Grep-c number pattern files: matching contexts show [number] rows,
grep pattern1 | PATTERN2 files: Displays rows that match pattern1 or pattern2.
grep pattern1 Files | grep pattern2: Displays rows that match both PATTERN1 and pattern2.
Here are some special symbols for searching:
\< and > mark the beginning and end of the word separately.
For example:
grep man * will match ' Batman ', ' manic ', ' man ' and so on,
grep ' \