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. python 进程池pool简单使用

    平常会经常用到多进程,可以用进程池pool来进行自动控制进程,下面介绍一下pool的简单使用. 需要主动是,在Windows上要想使用进程模块,就必须把有关进程的代码写if __name__ == ‘ ...

  2. SqlSession介绍

    SqlSession是MyBatis的关键对象,是执行持久化操作的对象,类似于JDBC中的Connection.它是应用程序与持久存储层之间执行交互操作的一个单线程对象,也是MyBatis执行持久化操 ...

  3. Attempt to present <TestViewController2: 0x7fd7f8d10f30> on <ViewController: 0x7fd7f8c054c0> whose view is not in the window hierarchy!

    当 storyboard里面的 按钮 即连接了 类文件里面的点击方法  又  连接了   storyboard里 另一个  控制器的  modal 就会出现类似Attempt to present & ...

  4. PHP —— 识别运算符实现逻辑比较

    最近遇到一个功能的开发,大致意思就是根据用户输入的条件,进行相关的比较操作.本来打算使用用户选择运算符的方式,但是后来结合项目实际,发现需要使用用户输入的自定义运算比较现实一点.大致意思就是: 1.用 ...

  5. 当visual studio的数据库项目遇到SQL71501

    这是因为数据库项目缺少login用户. 加上就好了,注意要加sql server用户. watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5 ...

  6. tensorflow 笔记8:RNN、Lstm源码,训练代码输入输出,维度分析

    tensorflow 官网信息:https://www.tensorflow.org/api_docs/python/tf/contrib/rnn/BasicLSTMCell tensorflow 版 ...

  7. 基于HTML5全屏图文左右滑动切换特效

    基于HTML5全屏图文左右滑动切换特效.这是一款基于jQuery+HTML5实现的全屏图文切换特效代码.效果图如下: 在线预览   源码下载 实现的代码. html代码: <main> & ...

  8. android开发(47) 使用xml drawable 实现 局部圆角,可用作圆角边框

    代码如下: <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android=" ...

  9. hdoj:2031

    #include <iostream> #include <string> using namespace std; int main() { int N,R; string ...

  10. 再战android-语音识别2(修改配置)

    可怕的半桶水一直在晃.程序中需要根据用户的选择设置语音识别的语言(目前科大讯飞支持英文.普通话.粤语),不想每次要用户去IatSetting中去改,需要能直接修改IatSetting的设置.之前移植的 ...