DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

compress(1)


compress, uncompress, zcat -- compress data for storage, uncompress and display compressed files

Synopsis

compress [-dfFqcv] [-b bits] file | -

uncompress [-fqc] file | -

zcat file | -

Description

compress takes a file and compresses it to the smallest possible size, creates a compressed output file, and removes the original file unless the -c option is present. Compression is achieved by encoding common strings within the file. uncompress restores a previously compressed file to its uncompressed state and removes the compressed version. zcat uncompresses and displays a file on the standard output.

If no file is specified on the command line or if - is given as the file name, input is taken from the standard input and the output is directed to the standard output. Output defaults to a file with the same filename as the input file with the suffix .Z or it can be directed through the standard output. The output files have the same permissions and ownership as the corresponding input files or the user's standard permissions if output is directed through the standard output.

If no space is saved by compression, the output file is not written unless the -F flag is present on the command line.

Options

The following options are available from the command line:

-d
Decompresses a compressed file.

-b bits
Specifies the maximum number of bits to use in encoding.

-c
Writes output on the standard output and does not remove original file.

-f
Forces output file to be written, even if one already exists, and even if no space is saved by compressing.

-F
Writes output file even if compression saves no space.

-q
Generates no output except error messages, if any.

-v
Prints the name of the file being compressed and the percentage of compression achieved. With uncompress, the name of the uncompressed file is printed.

References

ar(1), cat(1), pack(1), tar(1)

Notices

The compress, uncompress, and zcat commands have been updated to handle files larger than 2GB.
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004