D
D
Diversia2020-09-04 15:32:39
linux
Diversia, 2020-09-04 15:32:39

How to recursively find the desired string in php files?

Please tell me how to find text "text_example" in *.php files through the server console in all directories inside /var/www/html.
Thank you!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey Barbolin, 2020-09-04
@dronmaxman

find /var/www/html -name '*.php' -exec grep -H "text" {} \;

S
support_alteros, 2020-09-22
@support_alteros

cd /var/www/html
grep -r --include=*.php "text_example"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question