Format
unpack file…
Note: The unpack utility
is fully supported for compatibility with older UNIX systems.
However, it is recommended that the uncompress utility
be used instead because it may provide greater functionality and is
considered the standard for portable UNIX applications
as defined by POSIX.2 IEEE standard 1003.2-1992.
Description
unpack uncompresses
files compressed by pack, using a Huffman
minimal redundancy code. By default, unpack looks
for file with a .z extension. It
places the decompressed output in a file with the same name, but without
the extension. The owner, permissions, and times of last access and
last modification are also preserved. Packed files can be identified
by file. You can use pcat to
view packed text files without unpacking them in place.
unpack does
not unpack a file if:
- The file name is too long after the .z is removed
- The input file cannot be opened
- An existing file has the same name as the output file
- The output file can't be created
- The input file doesn't appear to have been created by pack
Localization
unpack uses
the following localization environment variables:
- LANG
- LC_ALL
- LC_COLLATE
- LC_CTYPE
- LC_MESSAGES
- NLSPATH
See Localization for more
information.
Files
unpack uses
the following file:
- pk$*
- Temporary copy of input
file. (You may see this in the current directory if unpack is
interrupted.) The file is in the same directory as the file being
unpacked.
Exit values
- 0
- Successful completion
- n
- Indicates that files could not be unpacked properly. For example,
if three out of six files could not be unpacked properly, the exit
status is 3.
Possible reasons for failure include:
- Unknown command-line option
- Error creating a name for a temporary file
- Error opening an input file or a temporary file
- Error writing to a temporary file
- Inability to rename a temporary file
- Inability to restore the modification time on a packed file
- Input file was not packed
- A packed file is corrupted
Messages
Possible error messages include:
- file: Not a packed file
- pack did not process the file. In this
case, the file is not changed.
Portability
POSIX.2, X/Open Portability Guide, UNIX systems.
Related information
file, pack, pcat