The Single UNIX ® Specification, Version 2
Copyright © 1997 The Open Group

 NAME

unpack - expand files (LEGACY)

 SYNOPSIS



unpack file...

 DESCRIPTION

The unpack utility replaces files in the format used by pack with their unpacked form. For each file file operand, a search is made for a file called file.z (or just file, if file ends in .z). If this file appears to be a packed file, it is replaced by its expanded version. The new file has the .z stripped from its name. If the invoking process has appropriate privileges, the ownership, modes, access time, and modification time of the original file are preserved.

A file is not unpacked if one of the following is true:

 OPTIONS

None.

 OPERANDS

The following operand is supported:
file
A pathname of a file to be unpacked; file can include or omit the .z suffix.

 STDIN

Not used.

 INPUT FILES

The input files are regular files in the format created by pack.

 ENVIRONMENT VARIABLES

The following environment variables may affect the execution of pack:
LANG
Provide a default value for the internationalisation variables that are unset or null. If LANG is unset or null, the corresponding value from the implementation-dependent default locale will be used. If any of the internationalisation 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 internationalisation 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).
LC_MESSAGES
Determine the locale that should be used to affect the format and contents of diagnostic messages written to standard error, and informative messages written to standard output.
NLSPATH
Determine the location of message catalogues for the processing of LC_MESSAGES .

 ASYNCHRONOUS EVENTS

If an error occurs, the $(basename file .z) file is not created and the original file is unchanged.

 STDOUT

The standard output is a text file containing one line for each file unpacked, with the following format in the POSIX locale:

"unpack: %s: unpacked\n", file

 STDERR

Used only for diagnostic messages.

 OUTPUT FILES

Files equivalent to the original unpacked file are created with the names as though $(basename file .z). were invoked corresponding to each file operand.

 EXTENDED DESCRIPTION

None.

 EXIT STATUS

The following exit values are returned:
0
Successful completion.
>0
An error occurred.

 CONSEQUENCES OF ERRORS

Default.

 APPLICATION USAGE

Applications should migrate to the uncompress utility.

 EXAMPLES

None.

 FUTURE DIRECTIONS

None.

 SEE ALSO

pack, pcat, uncompress.

UNIX ® is a registered Trademark of The Open Group.
Copyright © 1997 The Open Group
[ Main Index | XSH | XCU | XBD | XCURSES | XNS ]