Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 
share|improve this question

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 {} \;

share|improve this answer

You must log in to answer this question.

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