grep 'string' *.txt grep 'main(' *.c grep '#include<example.h>' *.c grep 'getChar*' *.c grep -i 'ultra' *.conf grep -iR 'ultra' *.conf grep --color=auto -nH 'DIR' *
- Where
- -i : Ignore case distinctions in both the PATTERN (match valid, VALID, ValID string) and the input files (math file.c FILE.c FILE.C filename).
- -R : Read all files under each directory, recursively
- -n : Prefix each line of output with the 1-based line number within its input file.
- -H Print the file name for each match. This is the default when there is more than one file to search.
- –color=auto Highlight autput.