Zgrep Command - Linux

How to use zgrep command in linux?

Snippet Code


  
Rate this page :
  [ 0 votes]

In linux gzip is used to compress a selected file into gz format. Generally grep is used to find the matched word in whole file. Here, zgrep is used to find the matched word from the compressed gz file. The test command for zgrep is given below.

$ gzip file1.txt $ zgrep 'test' file1.txt.gz

Tags


Ask Questions

Ask Question