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. plsql连接oracle数据库,不用配置任何东西(转)

    在软件开发的过程中,对于使用oracle的朋友们来说,使用plsql工具操作oracle数据库是非常方便的,可是plsql连接oracle数据库的方式有很多种,今天就给大家介绍一种最简单的连接方式,只 ...

  2. 机器学习中的规则化范数(L0, L1, L2, 核范数)

    目录: 一.L0,L1范数 二.L2范数 三.核范数 今天我们聊聊机器学习中出现的非常频繁的问题:过拟合与规则化.我们先简单的来理解下常用的L0.L1.L2和核范数规则化.最后聊下规则化项参数的选择问 ...

  3. python3用BeautifulSoup抓取图片地址

    # -*- coding:utf-8 -*- #python 2.7 #XiaoDeng #http://tieba.baidu.com/p/2460150866 #抓取图片地址 from bs4 i ...

  4. 【ShoppingPeeker】-基于Webkit内核的爬虫蜘蛛引擎 ShoppingWebCrawler的姊妹篇-可视化任务Web管理

    ShoppingPeeker 这个项目是蜘蛛项目的可视化任务站点. 项目github地址:ShoppingPeeker 开发语言:C# 开发工具:Visual Studio 2017 +.Net Co ...

  5. 你真的了解String的常见API吗?

    面试官Q1:请问String常见的方法有哪些,列举几个? String是我们开发中使用频率最高的类,它有哪些方法,大家一定不会陌生,例如: length();//计算字符串的长度 charAt();/ ...

  6. Linux 内存机制【转载】

    原文地址:http://blog.csdn.net/tianlesoftware/article/details/5463790 一. 内存使用说明 Free 命令相对于top 提供了更简洁的查看系统 ...

  7. mysql 物理数据存放

    报错误:1030 - Got error 28 from storage engine 3.在系统中查看/tmp是否已经满了: [root@localhost /]# df /tmp/ Filesys ...

  8. python gb2312 转换为 utf-8

    url = "" headers = { "Host":"www.chinanews.com", "User-Agent" ...

  9. C#-MVC开发微信应用(4)--微信门户菜单的管理操作

    最近对微信接口进行深入的研究,通过把底层接口一步步进行封装后,逐步升级到自动化配置.自动化应答,以及后台处理界面的优化和完善上,力求搭建一个较为完善.适用的微信门户应用管理系统. 在微信门户系统里面, ...

  10. 转移 Visual Studio 2017 的安装临时文件

    每次更新 Visual Studio 2017 会在 C 盘留下大量的缓存文件,因为目录比较深,怕以后忘了,用目录链接的形式转移到其它磁盘,也好方便清理: mklink /D C:\ProgramDa ...