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

zgrep用法的更多相关文章

  1. zcat,zgrep用法

    为减少日志文件占用的空间,很多情况下我们会将日志文件以天或周为周期打包成tar.gz 包保存.虽然这样做有利空间充分利用,但当我们想查看压缩包内的内容时确很不方便.如果只是一个tar.gz文件,可以将 ...

  2. 12个 Linux 中 grep 命令的超级用法实例

    12个 Linux 中 grep 命令的超级用法实例 你是否遇到过需要在文件中查找一个特定的字符串或者样式,但是不知道从哪儿开始?那么,就请grep来帮你吧. grep是每个Linux发行版都预装的一 ...

  3. 关于gzip zgrep zcat 的使用

    最近由于重构代码,要判断很多接口是否还在使用,然后就要从现在已有日志里面去找 是否还有调用.我很疑惑,如果要一个一个文件从文件系统里面拷贝出来然后再使用grep cat vi 等方法去查找该有多麻烦. ...

  4. Shell脚本字符串匹配及日常命令工具 - 用法总结(技巧指南)

    Shell提供了很多字符串和文件处理的命令,如awk.expr.grep.sed等命令,还有文件的排序.合并和分割等一系列的操作命令.下面重点总结下Shell字符串处理.文本处理以及各类命令及函数用法 ...

  5. EditText 基本用法

    title: EditText 基本用法 tags: EditText,编辑框,输入框 --- EditText介绍: EditText 在开发中也是经常用到的控件,也是一个比较必要的组件,可以说它是 ...

  6. jquery插件的用法之cookie 插件

    一.使用cookie 插件 插件官方网站下载地址:http://plugins.jquery.com/cookie/ cookie 插件的用法比较简单,直接粘贴下面代码示例: //生成一个cookie ...

  7. Java中的Socket的用法

                                   Java中的Socket的用法 Java中的Socket分为普通的Socket和NioSocket. 普通Socket的用法 Java中的 ...

  8. [转载]C#中MessageBox.Show用法以及VB.NET中MsgBox用法

    一.C#中MessageBox.Show用法 MessageBox.Show (String) 显示具有指定文本的消息框. 由 .NET Compact Framework 支持. MessageBo ...

  9. python enumerate 用法

    A new built-in function, enumerate() , will make certain loops a bit clearer. enumerate(thing) , whe ...

随机推荐

  1. RPC简述

    在某种意义上,WebService.REST均是RPC的实现,那么RPC的发展过程如何呢?本文参考了wikipedia,对RPC做一下简要摘记. RPC(RemoteProcedureCall),是进 ...

  2. How to measure IOPS for VMware

    http://blog.synology.com/blog/?p=2225 Executive SummaryThis article, intended towards IT Professiona ...

  3. REP开发技巧

    这个基本包含了所有的特殊情况 wrap 换行 title显示在每页的固定位置, 第一页需要特殊处理 <DATA> <PDF_TITLE Font="5" Size ...

  4. 启动apache (OS 10022)提供了一个无效的參数。解决方式

    今天 apache 突然启动不起来了,查看了一下错误日志发现了例如以下错误: [Tue Mar 17 11:27:32 2015] [crit] Parent: child process exite ...

  5. 带参数的sigmoid

    $y=\frac{1}{1+e^{-(\alpha\times x+\beta)}}$ alpha越大,曲线越陡峭,beta控制平移 import numpy as np import pylab a ...

  6. 每帧创建一个item

    -- 加载列表测试 function UIBagController:onLoadTest() self.goodsprop = DB.getTable("goodsprop"); ...

  7. Java compiler level does not match the version of the installed Java project facet解决办法

    意思就是project facet 和 java compiler level 不一致 解决办法: 修改project facet 方法一: 选中工程,右键 Property -> Projec ...

  8. 【iCore4 双核心板_ARM】例程十四:FATFS实验——文件操作

    实验现象: 核心代码: int main(void) { int i,j; FIL file; FATFS fatfs; static FRESULT res; unsigned ]; unsigne ...

  9. React Native 进的第一个坑

    Bundling index.ios.js [development, non-minified, hmr disabled] 0.0% (0/1), failed. error: bundling ...

  10. halcon模板匹配

    在机器视觉应用中,经常需要对图像进行仿射变换.1.在基于参考的视觉检测中,由于待检图像与参考图像或多或少都会存在几何变化(平移.旋转.缩放等),所以在做比较之前一般都要对待检图像进行仿射变换以对齐图像 ...