Performing grep operation in tar files without extracting

后端 未结 6 1371
梦谈多话
梦谈多话 2020-12-05 00:28

I have list of files which contain particular patterns, but those files have been tarred. Now I want to search for the pattern in the tar file, and to know which files conta

6条回答
  •  温柔的废话
    2020-12-05 00:50

    The command zgrep should do exactly what you want, directly.

    for example

    zgrep "mypattern" *.gz
    

    http://linux.about.com/library/cmd/blcmdl1_zgrep.htm

提交回复
热议问题