On Unix-like operating systems, the uncompress command uncompresses files that were compressed using the compress command.
This page covers the Linux version of uncompress.
Description
The uncompress utility will restore files to their original state after they are compressed using the compress utility. If no files are specified, the standard input will be uncompressed to the standard output.
- Description
- Syntax
- Exit status
- Examples
- Related commands
- Linux commands help
Files compressed with compress often have the extension .Z, and uncompress looks for and recognizes files with that extension as compressed files.
This utility supports the uncompressing of any files produced by compress. For files produced by compress on other systems, uncompress supports 9- to 16-bit compression (see -b, below).
Syntax
uncompress [-cfv] [file…]
Options
Exit status
uncompress returns the following status upon exit:
Examples
uncompress myfile.txt.Z
Uncompress the file myfile.txt.Z.
Note that the .Z extension is assumed by default. If instead this command were given as
uncompress myfile.txt
…uncompress would still search for myfile.txt.Z, and uncompress it.
Related commands
compress — Compress a file or files.ln — Create a link, or a symbolic link, to a file or directory.pack — Compress files using a Huffman algorithm.