linux find text in files recursively -include
# look for airflow Variable usage recursively in it's homepath
# include only python and sql files in the search
grep --include=\*.{py,sql} -rnw /home/airflow -e 'Variable'
# shows how to use exclude... it'll skip data or log files
grep --exclude=\*.{data,log} -rnw . -e 'Variable'
4
3
grep --include=\*.{c,h} -rnw '/path/to/somewhere/' -e "pattern"
Thank you!
3
0
4.14
7
grep -rnw '/path/to/somewhere/' -e 'pattern'
Thank you!
7
0
4.33
9
$ grep -r "String to be searched goes here" *
Thank you!
9
0
3.67
32
grep -rnw '/path/to/somewhere/' -e 'pattern'
Thank you!
32
0
4
9
grep --include=\*.{c,h} -rnw '/path/to/somewhere/' -e "pattern"
Thank you!
9
0
Are there any code examples left?
New code examples in category Shell/Bash