grep returning wrong messages in GNOME Desktop(Linux)

0

1

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 

Fr_nkenstien

Posted 2013-02-07T06:55:41.703

Reputation: 101

Answers

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

X Tian

Posted 2013-02-07T06:55:41.703

Reputation: 182