1.
Recursively search
$ grep -r "192.168.1.5" /etc/
or
$ grep -r 'parten' . (there is searching hidden and regelary file too )
but
$ grep -r 'parten' * (instead of . mean search with no hidden files included)
2.
Count line when words has been matched
grep can report the number of times that the pattern has been matched for each file using -c (count) option:
$ grep -c 'word' /path/to/file
Also note that you can use -n option, which causes grep to precede each line of output with the number of the line in the text file from which it was obtained:
$ grep -n 'word' /path/to/file
3.
How do I list just the names of matching files?
Use the -l option to list file name whose contents mention main():
$ grep -l 'main' *.c
4.
Finally, you can force grep to display output in colors:
$ grep --color vivek /etc/passwd
5.
'^' simbole
THIS IS '^' (FIRST SYMBOLE MARK) AND THIS '^$' IS clear line
'-v' OPTION IS INVERTING GREP