开发者

zcat files in and not in gzip format

开发者 https://www.devze.com 2022-12-19 03:27 出处:网络
I have all my Apache access log files as access.log, access.log.1 access.log.1.gz etc... What I want is to zcat all files in and not in gzip format and pipe them into an X program.

I have all my Apache access log files as access.log, access.log.1 access.log.1.gz etc... What I want is to zcat all files in and not in gzip format and pipe them into an X program.

I know I can do: zcat /var/log/apache2/access.log.*.gz | someapp..开发者_开发百科. but that will just work for *.gz and not the first two logs.

Any ideas will be appreciate it


use zcat -f, it will copy uncompressed files as is


For the specific use case of HTTP log server files, consider the zmergelog command (from the mergelog package). It additionally sorts the result of the merge chronologically.

0

精彩评论

暂无评论...
验证码 换一张
取 消