Find the answer to your Linux question:
Results 1 to 3 of 3
I want my users to have access to every history of their server. Therefore I don't chop up my logs and archive them, instead I have huge 1-2GB log files ...
  1. #1
    Just Joined!
    Join Date
    Sep 2007
    Posts
    7

    Grep inside a tar.gz

    I want my users to have access to every history of their server. Therefore I don't chop up my logs and archive them, instead I have huge 1-2GB log files that I keep because I allow them to search through it via webmin.

    Is there anyway I can have the log file tarred and gzipped but still allow the user to search through it easily?

  2. #2
    Linux Guru jmadero's Avatar
    Join Date
    Jul 2007
    Location
    California
    Posts
    1,958
    Bodhi 1.3 & Bodhi 1.4 using E17
    Dell Studio 17, Intel Graphics card, 4 gigs of RAM, E17

    "The beauty in life can only be found by moving past the materialism which defines human nature and into the higher realm of thought and knowledge"

  3. #3
    Linux Newbie
    Join Date
    Mar 2009
    Posts
    228
    Try this:

    Code:
    tar -O -xzvf /path/to/gziptarfile | grep 'string'
    The -O option extract files to standard output.

Posting Permissions

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