Hi everybody.
How can I find a file with a specific string in it?I searched web but non of the command work in OpenWRT world e.g.:
find . -iname '*php' | xargs grep 'string' -sl
or grep -R.
How to find a file with a string in it?
Moderator: Moderators
Re: How to find a file with a string in it?
ispyisail wrote:http://www.cyberciti.biz/faq/howto-sear ... xt-string/
I think I should search within a path not on whole device.Because I tried to use grep and other similar commands to search a file with a string in whole device and that was unsuccessful .
Thanks
Re: How to find a file with a string in it?
harsini wrote:Hi everybody.
How can I find a file with a specific string in it?I searched web but non of the command work in OpenWRT world e.g.:
find . -iname '*php' | xargs grep 'string' -sl
or grep -R.
Code: Select all
find . -type f -iname '*php' -exec grep -li 'string' {} \;