NAME
unpack — expand
files (LEGACY)
SYNOPSIS
unpack |
file... |
DESCRIPTION
The unpack utility replaces files in the
format used by pack(1) 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:
- The filename (exclusive of the .z ) has more than {NAME_MAX} bytes.
- The file cannot be opened.
- The file does not appear to be the output of pack(1) .
- A file with the unpacked name already exists.
- The unpacked file cannot be created.
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(1) .
ENVIRONMENT VARIABLES
The following environment variables may affect the execution of pack(1) :
LANG- Provide a default value for the internationalisation variables that are
unset or null. If
LANGis 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:
CONSEQUENCES OF ERRORS
Default.
APPLICATION USAGE
Applications should migrate to the uncompress(1) utility.
EXAMPLES
None.
FUTURE DIRECTIONS
None.
SEE ALSO
pack(1) , pcat(1) , uncompress(1) .