compress(1) | compress(1) |
NAME
compress, uncompress, zcat, compressdir, uncompressdir - compress and expand data
SYNOPSIS
Compress Files
compress
uncompress
zcat
c
Compress Entire Directory Subtrees compressdir [ options ] [ directory ... ]
uncompressdir [ options ] [ directory ... ]
DESCRIPTION
The following commands compress and uncompress ®les and directory subtrees as indicated:
compress | Reduce the size of the named ®les using adaptive |
| tion is possible, each ®le is replaced by a new ®le of the same name with the |
| suf®x .Z added to indicate that it is a compressed ®le. Original ownership, |
| modes, access, and modi®cation times are preserved. If no ®le is speci®ed, or if |
| - is speci®ed, standard input is compressed to the standard output. |
uncompress | Restore the compressed ®les to original form. Resulting ®les have the original |
| ®lename, ownership, and permissions, and the .Z ®lename suf®x is removed. If |
| no ®le is speci®ed, or if - is speci®ed, standard input is uncompressed to the |
| standard output. |
zcat | Restore the compressed ®les to original form and send the result to standard |
| output. If no ®le is speci®ed, or if - is speci®ed, standard input is uncompressed |
| to the standard output. |
compressdir | |
| use compress to compress each ®le in directory. Existing ®les are replaced by |
| a compressed ®le having the same name plus the suf®x .Z, provided the result- |
| ing ®le is smaller than the original. If no directories are speci®ed, compression |
| is applied to all ®les starting with the current directory. |
| options may include any valid compress command options (they are passed |
| through to compress). To force compression of all ®les, even when the result |
| is larger than the original ®le, use the |
uncompressdir Opposite of compressdir . Restore compressed ®les to their original form. options may include any valid uncompress command options (they are passed through to uncompress).
The amount of compression obtained depends on the size of the input, the maximum number of bits (max- bits) per code, and the distribution of common substrings. Typically, text such as source code or English is reduced by
Options
These commands recognize the following options in the combinations shown above in SYNOPSIS:
Decompress ®le. compress | |||
Force compression of ®le. | This is useful for compressing an entire directory, | ||
| even if some of the ®les do not actually shrink. If | ||
| compress is run in the foreground, the user is prompted as to whether an | ||
| existing ®le should be overwritten. | ||
This is the same as the | |||
| when there is null compression. | ||
Print a message describing the percentage of reduction for each ®le compressed. | |||
Force compress and uncompress to write to the standard output; no ®les | |||
| are changed. The nondestructive behavior of zcat is identical to that of | ||
− 1 − | Section 1−109 |