home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / unix / question / 15000 < prev    next >
Encoding:
Internet Message Format  |  1992-12-28  |  1.6 KB

  1. Path: sparky!uunet!airgun!airgun.wg.waii.com!bab
  2. From: bab@se39.wg2.waii.com (Brian Button)
  3. Newsgroups: comp.unix.questions
  4. Subject: Re: recursive grep'ing
  5. Message-ID: <BAB.92Dec28110925@se39.wg2.waii.com>
  6. Date: 28 Dec 92 16:09:25 GMT
  7. References: <Bzvwwo.Aq8@NCoast.ORG> <1992Dec28.043508.3237@csie.nctu.edu.tw>
  8. Sender: news@airgun.wg.waii.com
  9. Organization: Western Geophysical Exploration Products
  10. Lines: 33
  11. Nntp-Posting-Host: se39.wg2.waii.com
  12. In-reply-to: cp78065@csie.nctu.edu.tw's message of 28 Dec 92 04:35:08 GMT
  13.  
  14.  
  15. -->"Ji-Tzay" == Ji-Tzay Yang <cp78065@csie.nctu.edu.tw> writes:
  16.  
  17. Brad Banko (btb@NCoast.ORG) wrote:
  18. :     A small question, is it possible to recursively grep files? This could
  19. : be very useful, especially since many users on my unix box have files that con-
  20. : tain illegalities. Any help thru e-mail would be greatly appreciated.
  21. : -- 
  22. : Brad Banko
  23. : Internet : btb@ncoast.org
  24.  
  25. Ji-Tzay> Try the following line:
  26.  
  27. Ji-Tzay> find . -name "*" -print | xargs grep "YOUR PATTERN"
  28.  
  29. You should be able to drop the -name part, since you want all names.
  30.  
  31. Just use find . -print | xargs grep "PATTERN"
  32.  
  33. bab
  34. --
  35. |-----------------------|----------------------------------------------------|
  36. | Brian Button          | email : button@wg2.waii.com                        |
  37. | Design Engineer       |         71023.276@compuserve.com                   |
  38. | Western Geophysical   | voice : (713)964-6221                              |
  39. | 3600 Briarpark        |----------------------------------------------------|
  40. | Houston, Texas  77042 |                  Opinions Be Mine!!                |
  41. |-----------------------|----------------------------------------------------|
  42.