zcat broken on Mac OS X: Feature or bug?

Apparently on Mac OS X 10.4.7 (and earlier), the zcat command doesn’t work. zcat is a very useful util to read through gzip-archived system logs and usually works by just typing zcat /path/to/log.gz

However, it appears to be broken on the Mac. For example, this is actual output:

[user@host:~] zcat /var/log/system.log.0.gz
zcat: /var/log/system.log.0.gz.Z: No such file or directory
[user@host:~] zcat -S .gz /var/log/system.log.0.gz
zcat: /var/log/system.log.0.gz.Z: No such file or directory

Similar Posts:

  • jademe

    Use gzcat instead of zcat.

  • http://www.47ronin.com/ Glenn Batuyong

    Interesting development: Mac OS X 10.5 (Leopard) uses bzip2 to compress system logs. Thanks, jademe, for the reply. That was the hint I needed. For OS X, you need to use bzcat to read archived logs, i.e.

    bzcat /var/log/system.log.0.bz2
  • daz

    same problem with zcat; tried bzcat?

  • http://www.47ronin.com/ Glenn Batuyong

    Clarification: zcat is still broken in Mac OS X 10.5.x …apparently Apple wants us to switch over to bzcat. In earlier OS releases, archived system logs were stored gzipped. Now they're bzipped Thanks daz, that works perfectly.

  • http://thinlight.org/ qingbo

    You should try gzcat :-)

  • http://www.47ronin.com/ Glenn Batuyong

    yes, gzcat works well thanks!

  • http://www.47ronin.com/ Glenn Batuyong

    yes, gzcat works well thanks!