Linux pcat command

Updated: 05/04/2019 by Computer Hope
pcat command

On Unix-like operating systems, the pcat command prints the uncompressed contents of a file compressed with the pack compression tool.

Description

The pcat command does for packed files what cat does for ordinary files, except that pcat cannot be used as a filter. The specified files are unpacked and written to the standard output. pcat returns as its exit status the number of files it failed to unpack.

Failure may occur if:

  • the file cannot be opened, or if
  • the file does not appear to be the output of pack.

Syntax

pcat file

Examples

pcat myfile.txt.z

Print the uncompressed contents of the compressed file myfile.txt.z to the standard output.

pcat would also look for the file myfile.txt.z if the .z extension was omitted. For instance,

pcat myfile.txt

Also, prints the uncompressed file's contents myfile.txt.z, if it exists.

cat — Output the contents of a file.
compress — Compress a file or files.
pack — Compress files using a Huffman algorithm.
zcat — Print the uncompressed contents of compressed files.