Find the answer to your Linux question:
Results 1 to 2 of 2
I needed to review all jsp files on a single server to confirm which files contained a string pattern. The query below met my needs. Are there any other methods ...
  1. #1
    Just Joined!
    Join Date
    Jun 2008
    Posts
    1

    Linux recursive grep

    I needed to review all jsp files on a single server to confirm which files contained a string pattern. The query below met my needs. Are there any other methods that could have been employed to accomplish the same task?

    "find -type f -name "*.jsp" -exec grep -r -H -I "xxx xxx x" {} \;"

    I'm assuming there are several ways to do this - I'm looking for another angle.

    Thanks.

    Bob

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,974
    That's pretty much the method I use, though grep/egrep provide several options to recursively search thru directories. Check the man pages.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...