r = recursive
H = Print File names
n = Print Line Number
E = extended regex
–include=only match files with this regex name

grep -rHnE <==> egrep -rHn

1. print file name only

2. regex with grep – print only filenames

4. regex with grep

search recursively for files and occurrences of the keyword “recursive”

5. grep man

About Gugulethu Ncube

IT enthusiast getting things done.