zgrep在搜索之前是否将文件解压缩? [英] Does zgrep unzip a file before searching?

查看:50
本文介绍了zgrep在搜索之前是否将文件解压缩?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

zgrep会在搜索之前将gzip文件解压缩并进行临时复制吗?还是直接在压缩文件上搜索?

Does zgrep unzip a gzip file and make a temporary copy before searching or does it search directly on the compressed file?

推荐答案

zgrep 的="nofollow noreferrer">源使用 zcat 解压缩文件,并将结果通过管道传输到 grep .

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.

这篇关于zgrep在搜索之前是否将文件解压缩?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆