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
zgrep用法的更多相关文章
- zcat,zgrep用法
为减少日志文件占用的空间,很多情况下我们会将日志文件以天或周为周期打包成tar.gz 包保存.虽然这样做有利空间充分利用,但当我们想查看压缩包内的内容时确很不方便.如果只是一个tar.gz文件,可以将 ...
- 12个 Linux 中 grep 命令的超级用法实例
12个 Linux 中 grep 命令的超级用法实例 你是否遇到过需要在文件中查找一个特定的字符串或者样式,但是不知道从哪儿开始?那么,就请grep来帮你吧. grep是每个Linux发行版都预装的一 ...
- 关于gzip zgrep zcat 的使用
最近由于重构代码,要判断很多接口是否还在使用,然后就要从现在已有日志里面去找 是否还有调用.我很疑惑,如果要一个一个文件从文件系统里面拷贝出来然后再使用grep cat vi 等方法去查找该有多麻烦. ...
- Shell脚本字符串匹配及日常命令工具 - 用法总结(技巧指南)
Shell提供了很多字符串和文件处理的命令,如awk.expr.grep.sed等命令,还有文件的排序.合并和分割等一系列的操作命令.下面重点总结下Shell字符串处理.文本处理以及各类命令及函数用法 ...
- EditText 基本用法
title: EditText 基本用法 tags: EditText,编辑框,输入框 --- EditText介绍: EditText 在开发中也是经常用到的控件,也是一个比较必要的组件,可以说它是 ...
- jquery插件的用法之cookie 插件
一.使用cookie 插件 插件官方网站下载地址:http://plugins.jquery.com/cookie/ cookie 插件的用法比较简单,直接粘贴下面代码示例: //生成一个cookie ...
- Java中的Socket的用法
Java中的Socket的用法 Java中的Socket分为普通的Socket和NioSocket. 普通Socket的用法 Java中的 ...
- [转载]C#中MessageBox.Show用法以及VB.NET中MsgBox用法
一.C#中MessageBox.Show用法 MessageBox.Show (String) 显示具有指定文本的消息框. 由 .NET Compact Framework 支持. MessageBo ...
- python enumerate 用法
A new built-in function, enumerate() , will make certain loops a bit clearer. enumerate(thing) , whe ...
随机推荐
- C#高级编程四十一天----用户定义的数据类型转换
用户定义的数据类型转换 C#同意定义自己的 数据类型,这意味着须要某些 工具支持在自己的数据类型间进行数据转换.方法是把数据类型转换定义为相关类的一个成员运算符,数据类型转换必须声明为隐式或者显式,以 ...
- 监控命令之tsar
1.1 tsar是什么? tsar是淘宝自己开发的一个采集工具(类似于sar工具),主要用来收集服务器的系统信息(如cpu,io,mem,tcp等),以及应用数据(如squid haproxy ngi ...
- 基于redis 实现分布式锁(二)
https://blog.csdn.net/xiaolyuh123/article/details/78551345 分布式锁的解决方式 基于数据库表做乐观锁,用于分布式锁.(适用于小并发) 使用me ...
- O_DIRECT与O_SYNC区别(转)
O_DIRECT和O_SYNC是系统调用open的flag参数.通过指定open的flag参数,以特定的文件描述符打开某一文件. 这两个flag会对写盘的性能有很大的影响,因此对这两个flag做一些详 ...
- Delphi读取不Word中不规则表格数据并转换成标准表格
程序需要,需要将word中不规则的表格数据转换为标准的表格,即合并的单元格按正常格式解析,word中的表格格式如下: 解析后数据如下: 借鉴了网上代码,如下处理: procedure TfrmMain ...
- 应用程序默认安装在C盘后启动时提示权限不足想起的。。。
最近不少经销商用户反映,在使用win 7的系统的电脑上安装我们的软件后,开启系统时提示权限不足,无法启动软件. 而在xp系统下则没有这个问题,原因在于我们将系统的默认安装路径选择在了C盘了,而win ...
- java 代码的良好习惯
有很多书籍提到了代码开发的良好习惯,但是自己看过后,在开发中并不能每次都想起来.在此处开贴做笔记,以后自己开发的代码,必须符合. 不要在一个代码块的开头把局部变量一次性都声明了(这是c语言的做法),而 ...
- Selenium:注解@FindBy、@FindBys、@FindAll的用法
方式有3种:@FindBy.@FindBys.@FindAll.下文对3中类型的区别和使用场景进行介绍 1)@FindBy @FindBy(id= "A") private Web ...
- 【Java】分布式RPC通信框架Apache Thrift 使用总结
简介 Apache Thrift是Facebook开源的跨语言的RPC通信框架,目前已经捐献给Apache基金会管理,由于其跨语言特性和出色的性能,在很多互联网公司得到应用,有能力的公司甚至会基于th ...
- Opencv Mat运算(转)
一.矩阵Mat I,img,I1,I2,dst,A,B; double k,alpha; Scalar s; //注意Mat的行列号是从0开始的 //定义矩阵a,b,c Mat a,b,c; //生成 ...