|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Possible to Grep within .gz file without uncompress first?
When uncompressed the file size is over 800 megs, I wanted to know if I can search for a string within the compressed .gz file without uncompressing...
|
|
#2
|
||||
|
||||
|
well your going to have to decompress it in one way, but you don't have to store the uncompressed data
Code:
zcat /file.gz | grep string that will decompress it and pipe it to grep, so it will take a lot of CPU, but its won't store anything to the hard drive
__________________
Feed ME |
|
#3
|
|||
|
|||
|
Quote:
Thanks I'll give that a shot. |
|
#4
|
|||
|
|||
|
Consider also:
Code:
zgrep 'value to find' filename.gz |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > UNIX Help > Possible to Grep within .gz file without uncompress first? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|