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

Comments

7 responses to “zcat broken on Mac OS X: Feature or bug?”

  1. Use gzcat instead of zcat.

  2. 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
  3. same problem with zcat; tried bzcat?

    1. 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.

  4. You should try gzcat :-)

    1. yes, gzcat works well thanks!

  5. yes, gzcat works well thanks!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.