A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.geeksforgeeks.org/linux-unix/zgrep-command-in-linux-with-examples/ below:

zgrep command in Linux with Examples

zgrep command in Linux with Examples

Last Updated : 11 Jul, 2025

The zgrep command is used to search out expressions from a given a file even if it is compressed. All the options that applies to the grep command also applies to the zgrep command. 

Syntax:  

zgrep [grep options] Expression File name

Options: 

zgrep -c "linux" GFG.txt.gz
zgrep -i "LINUX" GFG.txt.gz
zgrep -n "linux" GFG.txt.gz
zgrep -v "linux" GFG.txt.gz
zgrep -e "linux" -e "Linux" GFG.txt.gz
zgrep -o "linux" GFG.txt.gz
zgrep -l "linux" *
zgrep -w "linux" GFG.txt.gz
zgrep -h "linux" GFG.txt.gz


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4