zgrep部分参数效果(OPTIONS)
–help
display this help and exit显示此帮助并退出
说明:大部分OPTIONS 与 “grep” 相同
-V, --version
output version information and exit输出版本信息并退出
说明:zgrep (gzip) 1.10
版权所有 (C) 2010-2018 自由软件基金会这是自由软件。
您可以根据以下条款重新分发其副本:GNU 通用公共许可证https://www.gnu.org/licenses/gpl.html。
在法律允许的范围内,不作任何保证。作者:Jean-loup Gailly。
-H, --with-filename
print the filename for each match打印每个匹配项的文件名
-i, --ignore-case
ignore case distinctions忽略大小写区别
-n, --line-number
print the line number of each line打印每行的行号
-o, --only-matching
show only the part of a line matching < pattern> 仅显示匹配的行部分< pattern>
说明:-o这个参数的使用加“”与否效果都一样
-w, --word-regexp
match only whole words仅匹配整个单词
说明:这个参数只能够查找一个完整单词,zgrep -x “单词” 所在压缩文件
-x, --line-regexp
match only whole lines仅匹配整行
说明:在使用命令的过程中应该注意格式为:zgrep -x “想要都搜索的一行内容” 所在压缩文件










728



被折叠的 条评论
为什么被折叠?



