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


...