grep command form (syntax)
grep “text string to search” directory-path
Current Directory –>
$ grep "offset" ./*.txt
Directories Recursively –>
Search for a text string all files under each directory, recursively with -r option:
$ grep -r "offset" /home/vhazrati
Only Filenames–>
Pass -H option to print the filename for each match.
$ grep -H -r “offset” /home/vhazrati
Filed under: linux Image may be NSFW.
Clik here to view.

Clik here to view.
