0

I need to search a particular string inside a folder structure.

The File system contains multiple files, but i need to check only XML files.

I searched and tried the commands for Linux Recursive search but it did not work. I got the following output from the command

$ grep -rio --include=*.xml "invokeAction" .
grep: No match.
$ grep -riwc "invokeAction" *
grep: <.Lists all the file Names recursively.>: No such file or directory
$ grep -ir invokeAction *.xml
grep: <.Lists all the file Names.>: No such file or directory

Please help.

I need to search

String: "invokeAction"
Mode: Word Only
Directory: Current Directory Recursively 

1 Answer 1

0

This will search from path, recursively, for all python files (*.py) and run grep -l import on each file

find /path/To/Seach -iname \*.py -exec grep -l import {} \;

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .