GNU.WIKI: The GNU/Linux Knowledge Base

  [HOME] [PHP Manual] [HowTo] [ABS] [MAN1] [MAN2] [MAN3] [MAN4] [MAN5] [MAN6] [MAN7] [MAN8] [MAN9]

  [0-9] [Aa] [Bb] [Cc] [Dd] [Ee] [Ff] [Gg] [Hh] [Ii] [Jj] [Kk] [Ll] [Mm] [Nn] [Oo] [Pp] [Qq] [Rr] [Ss] [Tt] [Uu] [Vv] [Ww] [Xx] [Yy] [Zz]


       zgrep - search compressed files for a regular expression


       zgrep [options] <pattern> [files]


       Zgrep is a front end to the grep program that allows transparent search
       on any combination of compressed and uncompressed files. If  any  given
       file  is  compressed, its decompressed content is used. If a given file
       does not exist, and its name  does  not  end  with  one  of  the  known
       extensions,  zgrep tries the compressed file names corresponding to the
       supported formats. If  no  files  are  specified,  data  is  read  from
       standard input, decompressed if needed, and fed to grep. Data read from
       standard input must be of the same type; all uncompressed or all in the
       same compression format.

       The supported formats are bzip2, gzip, lzip and xz.

       Exit status is 0 if match, 1 if no match, 2 if trouble.


       --help display this help and exit

       -V, --version
              output version information and exit

       -a, --text
              treat all files as text

       -A, --after-context=<n>
              print <n> lines of trailing context

       -b, --byte-offset
              print the byte offset of each line

       -B, --before-context=<n>
              print <n> lines of leading context

       -c, --count
              only print a count of matching lines per file

       -C, --context=<n>
              print <n> lines of output context

       -e, --regexp=<pattern>
              use <pattern> as the pattern to match

       -E, --extended-regexp
              <pattern> is an extended regular expression

       -f, --file=<file>
              obtain patterns from <file>

       -F, --fixed-strings
              <pattern> is a set of newline-separated strings

              force given format (bz2, gz, lz, xz)

       -h, --no-filename
              suppress the prefixing filename on output

       -H, --with-filename
              print the filename for each match

       -i, --ignore-case
              ignore case distinctions

       -I     ignore binary files

       -l, --files-with-matches
              only print names of files containing matches

       -L, --files-without-match
              only print names of files containing no matches

       -m, --max-count=<n>
              stop after <n> matches

       -n, --line-number
              print the line number of each line

       -N, --no-rcfile
              don't read runtime configuration file

       -o, --only-matching
              show only the part of a line matching <pattern>

       -q, --quiet
              suppress all messages

       -r, --recursive
              operate recursively on directories

       -s, --no-messages
              suppress error messages

       -v, --invert-match
              select non-matching lines

              verbose mode (show error messages)

       -w, --word-regexp
              match only whole words

       -x, --line-regexp
              match only whole lines

              set compressor and options for bzip2 format

              set compressor and options for gzip format

              set compressor and options for lzip format

              set compressor and options for xz format


       Report bugs to
       Zutils home page:


       Copyright  © 2014 Antonio Diaz Diaz.  License GPLv2+: GNU GPL version 2
       or later <>
       This is free software: you are free  to  change  and  redistribute  it.
       There is NO WARRANTY, to the extent permitted by law.

  All copyrights belong to their respective owners. Other content (c) 2014-2018, GNU.WIKI. Please report site errors to
Page load time: 0.117 seconds. Last modified: November 04 2018 12:49:43.