[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Commands Reference, Volume 5

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

-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.
-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

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

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.

Related Information

The compress command uses the modified Lempel-Zev algorithm described in "A Technique for High Performance Data Compression," Welch, Terry A. IEEE Computer, vol. 17, no. 6 (June 1984), pp. 8-19.

The compress command, pack command, unpack command, zcat command.

Commands Overview in AIX Version 4.3 System User's Guide: Operating System and Devices.


[ Previous | Next | Contents | Glossary | Home | Search ]