[SunHELP] grep.... recursive searching
Prakash Venkatakrishna
prakash.venkat at alopa.com
Thu Mar 7 11:28:33 CST 2002
Here's a few suggestions.. This is for the recursive search..
find . -exec grep -l "pattern to be matched" {} \; - Just list the files
which match the pattern.
find . -exec grep -l "pattern to be matched" {} \; > /tmp/find.txt -
Redirecting output to a file
vi 'find . -exec grep -l "pattern to be matched" {} \;' - will open the
file in vi so that you can edit all the files which match that pattern
Hope you find it useful.
Regards,
-Prakash
-----Original Message-----
From: DAUBIGNE Sebastien - BOR ( SDaubigne at bordeaux-bersol.sema.slb.com
) [mailto:SDaubigne at bordeaux-bersol.sema.slb.com]
Sent: Thursday, March 07, 2002 3:24 AM
To: sunhelp at sunhelp.org
Subject: RE: [SunHELP] grep.... recursive searching
find <rep> | xargs grep <expr>
---
Sebastien DAUBIGNE
sebastien.daubigne at sema.fr <mailto:sebastien.daubigne at sema.fr> - (+33)
(0)5.57.26.56.36 Sema Global Services - AFM/DW/Pessac
-----Message d'origine-----
De: Solaris Neophyte [SMTP:solarisneophyte at yahoo.com]
Date: jeudi 7 mars 2002 11:02
@: sunhelp at sunhelp.org
Objet: [SunHELP] grep.... recursive searching
hello,
I know that the grep command has the ability to search a group
of files... you
can even specify multiple directories... but I want to know if
there is an
option or some uncomplicated way to recursively search a
directory so that I
don't need to enter each and every directory within a tree.
-Sameer
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/
_______________________________________________
SunHELP maillist - SunHELP at sunhelp.org
http://www.sunhelp.org/mailman/listinfo/sunhelp
_______________________________________________
SunHELP maillist - SunHELP at sunhelp.org
http://www.sunhelp.org/mailman/listinfo/sunhelp
More information about the SunHELP
mailing list