how to find the particular string in unix

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gupta24
    New Member
    • May 2008
    • 11

    how to find the particular string in unix

    Hi

    how to find particualr string in current directory and all sub directories in unix(command promt).

    please help

    bye
    gupta
  • billyguy
    New Member
    • Jul 2008
    • 4

    #2
    Are you trying to find a string of characters in a file? Try grep.

    grep -r "whateveryourlo okingfor" *

    Comment

    • gupta24
      New Member
      • May 2008
      • 11

      #3
      yes correct but i want searching particular parttern string not only in current directory we find also enitre sub directoryies also



      please help
      bye
      gupta



      Originally posted by billyguy
      Are you trying to find a string of characters in a file? Try grep.

      grep -r "whateveryourlo okingfor" *

      Comment

      • mac11
        Contributor
        • Apr 2007
        • 256

        #4
        Originally posted by gupta24
        yes correct but i want searching particular parttern string not only in current directory we find also enitre sub directoryies also



        please help
        bye
        gupta
        billyguy gave you what you needed - check the manpage for grep 'man grep' , the "-r" makes it recurse into subdirectories

        Comment

        Working...