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 ...
  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,568
    Thanks for the answer.Hope that helps somebody
    - Lakshmipathi.G
    -------------------
    FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
    First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -------------------

  4. #4
    Linux Enthusiast Kloschüssel's Avatar
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    717
    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
  •  
...