Home

zcat

zcat is a command-line utility used on many Unix-like systems to display the contents of gzip-compressed files without creating an uncompressed copy on disk. It writes the decompressed data to standard output, making it convenient to view or pipe the contents of .gz files. It is functionally equivalent to running gzip -cd file.gz or gunzip -c file.gz.

Implementation and availability: zcat is provided by the gzip software package. On GNU/Linux systems it is commonly

Usage: zcat takes one or more gzip-compressed files as arguments and outputs the uncompressed data to standard

See also: gzip, gunzip, gzcat, zless, zmore.

a
symbolic
link
to
gzip
or
implemented
as
a
small
wrapper
that
invokes
gzip
-cd.
In
some
BSD-derived
systems
and
macOS,
an
equivalent
utility
named
gzcat
may
exist,
and
zcat
may
be
linked
to
that
program.
Regardless
of
the
exact
binary,
the
effect
is
the
same:
decompress
to
stdout.
output.
If
multiple
files
are
specified,
their
decompressed
contents
are
concatenated
in
order.
The
typical
workflow
is
to
pipe
the
output
to
another
program,
such
as
a
pager
or
a
file,
for
example:
zcat
file.gz
|
less
or
zcat
file1.gz
file2.gz
>
combined.txt.
If
a
file
is
not
in
gzip
format,
zcat
typically
reports
an
error.