uncompress expands files compressed by compress and restores them to their original form. If the calling process has the appropriate privileges, the owner, access permissions, and the access and modification times are not changed.
Whenever possible, each file specified is replaced by a file with the same name but without the .Z extension.
Expansion is not performed if
the file to be created already exists and uncompress is running in the background
the specified file was compressed with a higher value for maxbits (see compress -b) than your current system can process.
there are links to the compressed file.
Syntax
uncompress[ -cvf ][ file ...] |
No option specified The specified files are expanded.
uncompress writes the expanded files to standard output. No files are modified or created. uncompress -c has exactly the same effect as zcat.
(force) file.Z is expanded even if a file named file already exists. file is overwritten. -f not specified:
(verbose) uncompress issues a message confirming successful expansion.
Name of a file compressed with compress. You can specify more than one file. Each file name must include a .Z suffix which you do not have to specify when invoking uncompress. The expanded file is assigned the name file. file.Z is deleted after being successfully expanded (unless the -c option is specified). Access permissions, access and modification dates, and the owner of the file remain unchanged. |
Error
The specified file is not available in compressed format or is a directory.
The specified file was compressed with too high a value for maxbits (see compress -b). The system on which you called uncompress cannot process this value. Compress the file again using the value specified as yy in the error message or with a lower value.
There are xx links to the specified file. The file is not expanded.
The SIGSEGV signal (segmentation violation; an addressing error caused by unauthorized segment access) was received, which normally indicates that the input file is corrupted. |
Locale
The following environment variables affect the execution of uncompress: LANG Provide a default value for the internationalization variables that are unset or null. If LANG is unset of null, the corresponding value from the implementation-specific default locale will be used. If any of the internationalization variables contains an invalid setting, the utility will behave as if none of the variables had been defined. LC_ALL If set to a non-empty string value, override the values of all the other internationalization variables. LC_CTYPE Determine the locale for the interpretation of sequences of bytes of text data as characters (for example, single- as opposed to multi-byte characters in arguments and input files), the classification of characters as upper- to lower-case, and the mapping of characters from one case to the other. LC_MESSAGES Determine the locale that should be used to affect the format and contents of diagnostic messages written to standard error. NLSPATH Determine the location of message catalogs for the processing of LC_MESSAGES. |
Example
You want to expand the file topsecret.Z. The same directory already contains a file called topsecret, but this can be overwritten.
|
See also
compress, zcat |