Find the answer to your Linux question:
Results 1 to 3 of 3
I've lost my mind playing with find / locate / grep and I can't do it! I need help. I want to find all files/aps/php what ever, anything that isn't ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Nov 2005
    Posts
    1

    ENDLESS FRUSTRATION! "Find Files Containing Text WITHIN" does it exist?


    I've lost my mind playing with find / locate / grep and I can't do it! I need help.

    I want to find all files/aps/php what ever, anything that isn't a folder that contains the line 'lina' anywhere within the file/db/php. I want to search in a certain http folder, so that narrows it down.

    Can anyone help me?
    THANK YOU!!!

  2. #2
    Just Joined!
    Join Date
    Oct 2005
    Location
    North Carolina, USA
    Posts
    45
    cd /directory_tree_you_want_to_search
    find . -type f -exec grep -l "string to find" {} \; -print

  3. #3
    Just Joined!
    Join Date
    Dec 2008
    Posts
    1
    grep -Hr "string to find" <directory tree you want to search>

Posting Permissions

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