Why can't zgrep search recursively and errors out as "/usr/bin/zgrep -r option not supported" ?

Solution Verified - Updated -

Issue

  • Why can't zgrep search recursively and errors out as follows?
[root@localhost greptest]# zgrep -r *
/usr/bin/zgrep: -r: option not supported

Environment

  • Red Hat Enterprise Linux 7.3
  • grep-2.20-2.el7.x86_64
  • gzip-1.5-8.el7.x86_64

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.