Does zgrep unzip a gzip file and make a temporary copy before searching or does it search directly on the compressed file?
Asked
Active
Viewed 943 times
1 Answers
1
This source of zgrep
uncompresses the file with zcat
and pipes the result to grep
.
So, no, it does not use a temporary file, but yes, it decompresses (but not fully) before searching.

lhf
- 70,581
- 9
- 108
- 149
-
So does this [other source](https://fossies.org/linux/zutils/zgrep.cc), which is in C++. – lhf Jul 18 '17 at 19:16