home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / os / linux / 25346 < prev    next >
Encoding:
Text File  |  1993-01-24  |  1.9 KB  |  54 lines

  1. Newsgroups: comp.os.linux
  2. From: pep@wicked.demon.co.uk (Phil Packer)
  3. Path: sparky!uunet!pipex!demon!wicked.demon.co.uk!pep
  4. Subject: Re: TextSearch under Linux
  5. Reply-To: pep@wicked.demon.co.uk
  6. References: <7-PCNews-124beta@alpha.saar.de>
  7. Distribution: world
  8. X-Mailer: cppnews $Revision: 1.30 $
  9. Organization: No chance
  10. Lines: 39
  11. Date: Sun, 24 Jan 1993 22:41:51 +0000
  12. Message-ID: <727940511snx@wicked.demon.co.uk>
  13. Sender: usenet@demon.co.uk
  14.  
  15. In article <7-PCNews-124beta@alpha.saar.de> georg@alpha.saar.de (Georg Edelmann) writes:
  16. > Hello Linux-World,
  17. > I'm quite sure that anyone had this problem too :
  18. > what's the shell command(s) for searching text in files recursively
  19. > in all subdirectories from a given point in FS tree ?
  20. > Thanks for help.
  21. > Georg
  22. > ----
  23. > Georg Edelmann                                  Telephone: 49-7643-8807
  24. > georg@alpha.saar.de                             Address:   Dragonerstrasse 47
  25. >                                                            D 7834 Herbolzheim 4
  26. >                                                            Germany
  27.  
  28. I find that
  29.  
  30. grep "something" `find / -name "fred.txt" -print`
  31.  
  32. will find "something" in all files called "fred.txt" anywhere in the filesystem
  33.  
  34. Edit to taste!
  35.  
  36. Phil 8-)
  37.  
  38. ps you _do_ (IMHO) need all the quotes if you have wildcards in this anywhere!
  39. +-----------------------------+----------------------------------------------+
  40. |Phil Packer                  | pep@wicked.demon.co.uk          (home)       |
  41. |165 Stourton Avenue Hanworth | pep@cix.compulink.co.uk         (home)       |
  42. |Middlesex, England TW13 6LD  | pp1071bh.bbc-bh@radio.bbc.co.uk (someday)    |
  43. | 044 +81 898 0101            | PP1071BH@BBC-BH [via NHUB]      (MHS)        |
  44. | #include <very_long_x400_address.h>                                        |
  45. |         wicked is not associated with any other demon dial-up site         |
  46. +----------------------------------------------------------------------------+
  47.