Reference

Z (Unix compress)

A .Z file is the output of the classic Unix "compress" command, which uses LZW compression to shrink a single file. It is an old format that predates gzip and is now largely replaced by gzip (.gz) and other tools.

Files & formatsGeneral

Z (Unix compress)

Also known as: .Z file, Unix compress, compress LZW, uncompress

A .Z file is the output of the classic Unix "compress" command, which uses LZW compression to shrink a single file. It is an old format that predates gzip and is now largely replaced by gzip (.gz) and other tools.

  • Output of the classic Unix compress (LZW)
  • Predates and was replaced by gzip
  • Holds one file; combine with tar for many

The original Unix compressor

The Unix compress utility produced .Z files using LZW compression. For years it was the standard way to shrink files on Unix systems before gzip arrived with better compression and no patent concerns.

A .Z file holds one compressed file; bundling multiple files is done with tar first (producing .tar.Z).

Opening .Z files

The `uncompress` and `gunzip` commands, plus archive tools like 7-Zip and The Unarchiver, open .Z files. Today gzip (.gz) and xz have effectively replaced it.

Related terms

Keep reading the reference.