Find the answer to your Linux question:
Results 1 to 4 of 4
Hello! I'm trying to search the string "Listen" in a few files (config files). I made find /apps/apache* -exec grep -H Listen {} \; but the result list is very ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2011
    Location
    Madid España
    Posts
    2

    Help with find command


    Hello!

    I'm trying to search the string "Listen" in a few files (config files).

    I made

    find /apps/apache* -exec grep -H Listen {} \;

    but the result list is very long.

    How i make a "grep -v" whith this command?

    Ty!

  2. #2
    Just Joined!
    Join Date
    May 2011
    Location
    Madid España
    Posts
    2
    ... autoresponse

    find /aplicaciones/apache* -exec grep -H Listen {} \; | grep -v "#"

  3. #3
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,757
    Thanks for the answer.Hope that helps somebody
    First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -----
    FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org

  4. #4
    Linux Engineer Kloschüssel's Avatar
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    773
    Note that /apps/apache* can expand to a large number of files and thus lead to problems. fgrep should be a better way that is faster and easier to understand.

Posting Permissions

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