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 ...
随机推荐
- Spark2.2+ES6.4.2(三十一):Spark下生成测试数据,并在Spark环境下使用BulkProcessor将测试数据入库到ES
Spark下生成2000w测试数据(每条记录150列) 使用spark生成大量数据过程中遇到问题,如果sc.parallelize(fukeData, 64);的记录数特别大比如500w,1000w时 ...
- 未能找到temp\select2.cur的一部分
环境 操作系统:win10 家庭普通版本 x64 账户类型:管理员 SuperMap:9D 打开自定义的应用程序时,会报错:未能找到路径"C:\Users\user\AppData\Loca ...
- shell编程学习笔记(一):编写我的第一段代码
目前在学习Shell编程,我会把我的学习笔记记录在这里.大神可以直接略过~ 嗯,第一段代码,肯定是要输出Hello World了~ 以下蓝色字体的内容为linux命令,红色字体的内容为输出的内容: # ...
- 关于html,body{height:100%}的解释
来源:https://www.cnblogs.com/QianBoy/p/8571682.html 今天看到一个CSS样式:html,body{height:100%},第一次看到,感觉挺奇怪,为什么 ...
- Ubuntu18.04的网络管理netplan和防火墙ufw
Netplan Ubuntu18.04使用的网络管理是netplan, 配置文件在/etc/netplan/下 刚安装完成的配置是这样的 刚安装完成的配置是这样的 network: ethernets ...
- Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.
SpringBoot项目编译成功,启动报错 提示信息很明显,通过查看依赖关系,可以找到原因 导致这个问题的原因是因为,在 pom.xml 配置文件中,配置了数据连接技术 spring-boot-sta ...
- js获取过滤条件中参数的快捷方式
// window.location.href = "topupRecordController.do?exportExcel&" + encodeURI($(" ...
- redis优化配置和redis.conf说明(转)
1. redis.conf 配置参数: #是否作为守护进程运行 daemonize yes #如以后台进程运行,则需指定一个pid,默认为/var/run/redis.pid pidfile redi ...
- rinetd 一个linux下的端口转发工具
inux下使用iptables实现端口转发,配置较为复杂,使用rinetd工具可以实现快速配置和修改端口转发. 例:本机ip:1.1.1.1 需要实现访问本机的8080端口,自动转发到2.2.2.2 ...
- Atitit php vs node.js attilax总结
Atitit php vs node.js attilax总结 1.1. 上手度 还是php 1 1.2. Node.js最大的缺点 异步回调导致可读性差..特别嵌套的时候.. 1 1.1. 上手 ...