uncompress Command

Purpose

Restores compressed files.

Syntax

uncompress-c ] [  -F ] [  -f ] [  -n ] [  -q ] [  -V ] [  File ... ]

Description

The uncompress command restores original files that were compressed by the compress command. Each compressed file specified by the File parameter is removed and replaced by an expanded copy. The expanded file has the same name as the compressed version, but without the .Z extension. If the user has root authority, the expanded file retains the same owner, group, modes, and modification time as the original file. If the user does not have root authority, the file retains the same modes and modification time, but acquires a new owner and group. If no files are specified, standard input is expanded to standard output.

Flags

Item Description
-c Write to standard output. No files are changed.
-f or -F Forces expansion. The -f and -F flags are interchangeable. Overwrites the file if it already exists. The system does not prompt the user that an existing file will be overwritten. File size may not actually shrink.
-n Omits the compressed file header from the compressed file.
Note: Use this option if the file was compressed using the -n flag. Otherwise, uncompressing the file will not work.
-q Suppresses the display of compression statistics generated by the -v flag. If several -v and -q flags are on the same command line, the last one specified controls the display of the statistics.
-V Writes the current version and compile options to standard error.

Parameters

Item Description
File ... Specifies the compressed files to restore.

Return Values

The uncompress command detects an error and exit with a status of 1 if any of the following events occur:

If no error occurs, the exit status is 0.

Exit Status

Item Description
0 Successful completion.
>0 An error occurred.

Example

To uncompress the foo.Z file, enter:

uncompress foo.Z

The foo.Z file is uncompressed and renamed foo.