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 ...
随机推荐
- Android典型界面设计(5)——使用SlidingMenu和DrawerLayout分别实现左右侧边栏
一.问题描述 侧边栏是Android应用中十分常见的界面效果,可随主屏在左侧或右侧联动,是特别适应手机等小屏幕特性的典型界面设计方案之一,常用作应用的操作菜单,如图所示 实现侧边栏可以使用第三方组件s ...
- Html5游戏框架createJS组件--EaselJS
CreateJS库是一款HTML5游戏开发的引擎,是一套可以构建丰富交互体验的HTML5游戏的开源工具包,旨在降低HTML5项目的开发难度和成本,让开发者以熟悉的方式打造更具现代感的网络交互体验. 掌 ...
- Windows下libjpeg-trubo-1.5.3编译(VS2015)
简述 https://libjpeg-turbo.org/的网站上是有已经编译好的版本下载的,但是VC下是使用的VC10.0编译的.虽然在VC14.0下也能用,但是我还是需要编译一个VC14.0版本的 ...
- tmux手册中文翻译
man tmux可以看到最详细的tmux介绍,本文翻译自tmux手册. tmux全名叫"terminal multiplexer",终端多路复用器. tmux的命令格式为: tmu ...
- Android UI系列-----RelativeLayout的相关属性
本篇随笔将主要记录一些RelatieLayout的相关属性,并将猜拳游戏通过RelativeLayout实现出来 RelativeLayout的几组属性 第一组属性:android:layout_be ...
- 使用vuejs做一个todolist
在输入框内输入一个list,回车,添加到list列表中,点击列表中的项样式改变 1.index.html <!DOCTYPE html> <html> <head> ...
- (转)Linux服务器磁盘空间占满问题
转自:https://www.cnblogs.com/cindy-cindy/p/6796684.html 下面我们一起来看一篇关于Linux服务器磁盘占满问题解决(/dev/sda3 满了),希望碰 ...
- Mac安装crfpp
Mac安装crfpp 步骤 git clone https://github.com/taku910/crfpp.git ./configure make sudo make install cd p ...
- Python3解《剑指》问题:“遇到奇数移至最前,遇到偶数移至最后”
[本文出自天外归云的博客园] 看到一个<剑指Offer>上的问题:“遇到奇数移至最前,遇到偶数移至最后.” 我做了两种解法.一种是利用python内置函数,移动过程用了插入法,很简单.另一 ...
- 【30集iCore3_ADP出厂源代码(ARM部分)讲解视频】30-12底层驱动之液晶画点驱动
视频简介:该视频介绍iCore3应用开发平台中液晶驱动的方法. 源视频包下载地址:链接:http://pan.baidu.com/s/1qXQoOQo 密码:gvgo 银杏科技优酷视频发布区:http ...