[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Commands Reference, Volume 5

unpack Command

Purpose

Expands files.

Syntax

unpack File ...

Description

The unpack command expands files created by the pack command. For each file specified, the unpack command searches for a file called File.z. If this file is a packed file, the unpack command replaces it by its expanded version. The unpack command names the new file name by removing the .z suffix from File. If the user has root authority, the new file has the same access modes, access and modification times, owner, and group as the original file. If the user does not have root authority, the file retains the same access modes, access time, and modification time, but acquires a new owner and group.

The unpack command operates only on files ending in .z. As a result, when you specify a file name that does not end in .z, the unpack command adds the suffix and searches the directory for a file name with that suffix.

The exit value is the number of files the unpack command was unable to unpack. A file cannot be unpacked if any of the following occurs:

Exit Status

This command returns the following exit values:

0 The command ran successfully.
>0 An error occurred.

Example

To unpack packed files:

unpack chap1.z chap2

This expands the packed files chap1.z and chap2.z, and replaces them with files named chap1 and chap2. Note that you can give the unpack command file names either with or without the .z suffix.

Files

/usr/bin/unpack Contains the unpack command.

Related Information

The cat command, compress command, pack command.

Files Overview in AIX 5L Version 5.2 System User's Guide: Operating System and Devices.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]