uncompress

undo compression of a file 

Command


SYNOPSIS

uncompress [-cDfRVv] [-O output_directory] [file]


DESCRIPTION

uncompress expands compressed data written by the compression programs compress and mkszip. Data is read from file or the standard input. The name of the file to be decompressed usually ends with .Z .gz, or .bz2. If file doesn't have one of these extensions, uncompress looks for file.Z, file.gz, and file.bz2 (in that order). uncompress places the decompressed output in a file with the same name but without the extension. If this file already exists, uncompress asks if you want to overwrite it, unless you specify the -f option. If none of file.Z, file.gz, or file.bz2 are found, file (with no extension) is used.

For LZW-compressed files, the number of bits of compression is encoded in the compressed data, so the uncompress command automatically uses the correct number of bits. This includes the 9-14 bit compression range specified by XPG.

Options

-c 

writes decompressed output to the standard output (like zcat).

-D 

must be used to decompress a sorted dictionary file compressed using the -D option of compress and mkszip.

-f 

forces the file to be decompressed, even if a file with the same base name already exists.

-O output_directory 

puts the output file in the specified output_directory.

-R 

specifies that the input file is not to be removed.

-V 

prints the version number information for uncompress.

-v 

displays the name of each file when it is decompressed.


ENVIRONMENT VARIABLES

TK_NTLINKS_OFF 

MKS Toolkit supports hard links under 8.1/2012R2/10/2016/2019/11/2022 on NTFS file systems. There is a slight loss of performance for this support. If you do not require hard link support, you should set and export the environment variable TK_NTLINKS_OFF to disable this support.


DIAGNOSTICS

Possible exit status values are:

0 

Successful completion.

1 

Failure due to any of the following:

— unknown command line option
— inability to obtain information about an argument file
— file has more than one link
— file is not a regular file
— file is not in compressed format
— file was compressed using more than 16 bits
— there is no space for decompress tables
— a compressed file is corrupt


PORTABILITY

x/OPEN Portability Guide 4.0. Windows 8.1. Windows Server 2012 R2. Windows 10. Windows Server 2016. Windows Server 2019. Windows 11. Windows Server 2022.

uncompress is found on many UNIX systems. That version allows decompression in place as well as to the standard output.

The support for .gz and .bz2 files and the -D option is an extension to the traditional implementations of uncompress; the -D and -V options are extensions to XPG.


AVAILABILITY

PTC MKS Toolkit for Power Users
PTC MKS Toolkit for System Administrators
PTC MKS Toolkit for Developers
PTC MKS Toolkit for Interoperability
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Commands:
bzdiff, bzgrep, bzip2, bzmore, compress, cpio, gzip, mkszip, pax, tar, unpack, unzip, zcat, zip, zipinfo

MKS Toolkit Backup and Tape Handling Solutions Guide


PTC MKS Toolkit 10.4 Documentation Build 39.