我想从包含文本文件的.gz文件中搜索特定字符串,而不在linux终端中解压缩.我知道如何使用文本文件搜索字符串grep "text to search" ./myfile.txt.但是如何使它适用于.gz文件?
grep "text to search" ./myfile.txt
linux grep gzip
grep ×1
gzip ×1
linux ×1