zoukankan      html  css  js  c++  java
  • zgrep用法

    http://manpages.ubuntu.com/manpages/trusty/man1/zgrep.1.html

    NAME

           Zgrep - search compressed files for a regular expression
    
    

    SYNOPSIS

           zgrep [options] <pattern> [files]
    
    

    DESCRIPTION

           Zgrep is a front end to the grep program that allows transparent search
           on any combination of compressed and non-compressed files. If any given
           file  is  compressed, its uncompressed 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 compressors. 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
           compressed  with  the  same  compressor.  The supported compressors are
           bzip2, gzip, lzip and xz.
    
           Exit status is 0 if match, 1 if no match, 2 if trouble.
    
    

    OPTIONS

           --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
    
           -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
    
           -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
                  verbose mode (show error messages)
    
           -w, --word-regexp
                  match only whole words
    
           -x, --line-regexp
                  match only whole lines
  • 相关阅读:
    Hibernate3 第一天
    Struts2第四天
    Struts2第二天
    Struts2第一天
    【剑指offer】数字在排序数组中出现的次数,C++实现
    【剑指offer】两个链表的第一个公共结点,C++实现
    【剑指offer】数组中的逆序对。C++实现
    [Python]定时任务框架 APScheduler
    [pandas] SettingWithCopyWarning: A value is trying to be set on a copy of a slice from a DataFrame
    alicode35-找出二叉搜索树的第2大的数
  • 原文地址:https://www.cnblogs.com/jyaray/p/6323177.html
Copyright © 2011-2022 走看看