+3 votes
in Operating Systems by (6.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"


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 (25.5k 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