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

Commands Reference, Volume 4

pcat Command

Purpose

Unpacks files and writes them to standard output.

Syntax

pcat File ...

Description

The pcat command reads the files designated by the File parameter, unpacks them, and writes them to standard output. Whether or not the specified file ends in the .z characters, the pcat command assumes that the file is packed and unpacks it.

The exit value of the pcat command is the number of files it 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 Successful completion.
>0 An error occurred.

Examples

  1. To display compressed files, enter:

    pcat chap1.z chap2 | pg

    This command sequence displays the compressed files chap1.z and chap2.z on the screen in expanded form, a page at a time ( | pg ). Note that the pcat command accepts files with and without the .z characters.

  2. To use a compressed file without expanding the copy stored on disk, enter:

    pcat chap1.z | grep 'Greece'

    This command sequence prevents the pcat command from displaying the contents of chap1.z in its expanded form and pipes it to the grep command.

File

/usr/bin/pcat Contains the pcat command.

Related Information

The cat command, grep command, pack command, unpack command.

Files Overview.and Input and Output Redirection 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 ]