Zcat/Zgrep/Zdiff


搜索关键字:

zgrep zcat

参考内容:

The old way…

$ gzip -d data.txt.gz
$ cat data.txt
$ less data.txt
$ more data.txt

The new way…

$ zcat data.txt.gz
$ zless data.txt.gz
$ zmore data.txt.gz

Compare compressed files. The syntax is:

$ zdiff file1.gz file2.gz
$ zcmp file1.gz file2.gz

==

$ zegrep -w '^word1|word2' file.gz
$ zgrep 'wordToSearch' file.gz
$ zgrep '1.2.3.4' access_log_1.gz
$ find /path/to/dir/ -iname '*.gz' -print0 | xargs -0 -I {} zgrep "pattern" {}

$ zcat ABC/myzippedfile1.txt.gz | grep "pattern match"

$ zgrep -R --include=*.gz -H "pattern match" .

$ find . -name "*.gz" -exec zgrep "pattern match" \{\} \;

$ find . -name "*.gz" -exec zcat "{}" + | grep "pattern match"

$ zcat -r /some/dir/here | grep "pattern match"
参考链接:
, ,

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注