Open System Services Shell and Utilities Reference Manual (G06.28+, H06.05+)
unpack(1) OSS Shell and Ut
ilities Reference Manual
NAME
unpack - Expands files compressed by the pack command
SYNOPSIS
unpack file[.z] ...
DESCRIPTION
The unpack command expands files created by pack. For each file specified, unpack searches
for a file named file.z. If this file is a packed file, unpack replaces it with its expanded version.
The unpack command names the new file by removing the .z suffix from file.z. The unpack
command tries to preserve the access modes, access and modification dates, and owner from the
compressed file, but it can do so only if you have the appropriate privileges (see the chmod(1)
reference page); otherwise, unpack expands the compressed file and assigns your owner and
group ID to the new file.
The exit value is the number of files the unpack command was unable to expand (unpack). A file
cannot be unpacked if any one of the following occurs:
• The file cannot be opened.
• The file is not a packed file.
• A file with the unpacked filename already exists.
• The unpacked file cannot be created.
If the file has an access control list (ACL), the ACL is preserved when the file is unpacked. For |
more information about ACLs, see the acl(5) reference page.
Operands
file[.z] Specifies the filename of the file to be unpacked. If the .z suffix is omitted, it is
assumed.
Environment Variables
This command supports the use of the LANG, LC_ALL, LC_CTYPE, LC_MESSAGES, and
NLSPATH environment variables.
EXAMPLES
To unpack packed files, enter:
unpack chap1.z chap2
This command expands the packed files chap1.z and chap2.z, replacing them with files named
chap1 and chap2. Note that you can give unpack filenames either with or without the .z suffix.
NOTES
1. unpack operates only on files whose names end in .z. As a result, when you specify a
filename file that does not end in .z, unpack adds that suffix and searches the directory
for the filename file.z.
2. The unpack command writes a warning to the standard output file if the file it is unpack-
ing has links. Any other files linked to the packed file’s original inode still exist and are
still packed.
3. If the file being unpacked has a symbolic link, the new unpacked file has a different
inode than the packed file from which it was created.
9−36 Hewlett-Packard Company 527188-007