[Ilugc] recursive search

  • From: dearsaravanan@xxxxxxxxx (Saravanan S)
  • Date: Wed Jan 13 14:00:49 2010

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


How to find the text from a file(directory & subdirectory). (recursive
search)
cat * | grep "text"  But it searches only the current directory also it not
lists the filename.


The  -R switch for grep works for you :)

grep -R "search_text" <Directory>


Saravanan Sundaramoorthy
Red Hat Certified Engineer
+91 99404 32545

Other related posts: