lz is a shell script by David C. Niemi. It is used to list and unpack (most often) compressed file archives.

The original would only work with tar archives. I have changed it to use cpio because cpio understands several archive formats, among them cpio (of course) and tar.

lz understands the following compressed formats:

Warning: If you extract RPM or Debian archives with uz, you may or may not get the expected result. This is because these archives may contain pre or post install scripts which are not executed by uz. Also uz ignores any dependencies of the packages and so may confuse your package database. Better use the appropriate package manager for extracting these archives.





lz is designed to be extremely simple to use. So there are no command line options except the file name(s). To view the contents of an archive, just type lz filename. To extract an archive, type uz filename. This extracts the archive into the current directory and lists the extracted files on the screen. It overwrites existing files without backup, asking for permission to do so if the extraction program supports this. It tries to preserve the original directory structure, ownerships, and permissions as much as possible. If it fails to do so, it's probably a bug. It also tries to convert newlines in text files into the correct (Unix) representation if the extraction program supports this.

lz and uz can also read from standard input. In this case they can only handle cpio or tar archives compressed with compress or gzip, however.

The ease of use of lz comes at a price, however. Flexibility is greatly reduced. This means lz can fail to detect the correct type of the archive file. If this happens to you, tough. Just use the original extraction program in this case. This means typing a few more letters, but there's nothing else that can be done. However, this should happen very rarely, and I might fix it if you notify me.

Software Index | Home Page
Created by hjb
Updated 2004-09-30