+3 votes
in Operating Systems by (60.2k 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

+1 vote
by (355k points)
selected by
 
Best answer

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

zgrep "patten" file_name


...