Open System Services Shell and Utilities Reference Manual (G06.25+, H06.03+)
Table Of Contents
User Commands (v - z) zcat(1)
NAME
zcat - Expands compressed data
SYNOPSIS
zcat [-n][file[.Z] ... ]
FLAGS
-n Specifies that no header is added or expected. This flag might be useful for expanding
old files.
DESCRIPTION
The zcat command writes the uncompressed version of a compressed file to the standard output
file. The compressed (.Z) file remains intact.
zcat is identical to the command uncompress -c.
You can specify the compressed target file with or without the .Z suffix; if you do not specify the
suffix, zcat assumes it. If you do not specify a file or if you specify - by itself, then the zcat com-
mand expands the standard input file.
Operands
file[.Z] Specifies the pathname of the compressed file to be expanded. If the .Z suffixis
omitted, it is assumed.
Environment Variables
This command supports the use of the LANG, LC_ALL, LC_CTYPE, LC_MESSAGES, and
NLSPATH environment variables.
EXIT VALUES
The zcat command returns the following values:
0 (zero) The command completed successfully.
>0 An error occurred or an attempt was made to expand a file that is not
compressed.
RELATED INFORMATION
Commands: compress(1), uncompress(1).
STANDARDS CONFORMANCE
This command conforms to the XPG4 Version 2 specification with extensions.
527188-003 Hewlett-Packard Company 10−45