+3 votes
in Operating Systems by (4.6k points)

I have a very large gzipped file and want to seach a text/substring in the file. I am using

zcat file_name | grep "pattern"

and

less file_name | grep "pattern"

But both of these commands are very slow. Is there any other command to search a gzipped file?

1 Answer

0 votes
by (21.4k points)

You can try zgrep . I am not sure if zgrep is faster than what you already used. Give a try.

zgrep "patten" file_name

...