[Ilugc] recursive search

  • From: barathee@xxxxxxxxx (Pandian R)
  • Date: Wed Jan 13 13:55:00 2010

find .|xargs grep 'text'

Pandian R
---------------------------------------------------
*Free* software is a matter of liberty not price. You should think of "free"
as in "free speech".

Proud user of Ubuntu 9.1 - 64



On Wed, Jan 13, 2010 at 1:51 PM, Suresh Kumar Subramanian <
sureshkumar.s@xxxxxxxxxx> wrote:

Hi,

How to find the text from a file(directory & subdirectory). (recursive
search)

Ex :
Directories :
/prog
/prog/sub1/
/prog/sub1/dir1/
/prog/sub2/

Each folder contains some text files.

I want to search a "text" from all the files in the directory /prog and
subdirectories.

I tried
cat * | grep "text"  But it searches only the current directory also it not
lists the filename.

How do I do this

Thanks
Suresh
_______________________________________________
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc

Other related posts: