Penguin
Annotated edit history of zcat(1) version 16, including all changes. View license author blame.
Rev Author # Line
16 BruceKingsbury 1 __Note:__ "zcat" is also the nickname of BruceKingsbury. ([homepage|http://zcat.geek.nz/])
15 MattBrown 2 <?plugin WlugLicenseAgreement hide=1 ?>
10 AristotlePagaltzis 3 ----
11 JohnMcPherson 4 __zcat__ is used for decompressing ".gz" zipped files and writing them to standard output. It behaves exactly as if you had typed "gzip -d -c" instead (-d decompresses, -c writes to stdout).
8 zcat(1) 5
11 JohnMcPherson 6 On most systems, zcat is a link to gzip, and gzip behaves differently based on what name it was executed as.
8 zcat(1) 7
11 JohnMcPherson 8 See the gzip(1) man page.
8 zcat(1) 9
10 ----
11 JohnMcPherson 11 !!User Comments
8 zcat(1) 12
13
14 someone was searching for examples for zcat, so well, why disappoint?
15 $ ls
16 interestingfile.txt.gz
17 $ zcat interestingfile.txt.gz
18 this is a compressed interesting text file
19
20 For the examples above I'd probably use zless, since if a textfile was worthy of being compressed it's likely to have been very large to begin with.
21
22 There aren't many places where 'zcat' is the shortest command for the job. Eg. "zcat foo.tgz | tar x" is probably better done by the command "tar xzf foo.tgz"
23
24 Probably the best example I can think of would be;
25 $ zcat patch-x.y.z.gz | patch -p0
26
27 Patches are usually compressed, and patch(1) doesn't have a 'compressed' switch like tar(1) does..
12 AdamPippin 28
29
30 Another example (make sure to have your speakers on!):
31 $ zcat /vmlinuz > /dev/audio
13 zcat(1) 32 (BruceKingsbury notes; this is a pointless example at best, the difference between compressed and uncompressed executable code, or /dev/urandom for that matter, piped into /dev/audio is fairly insignificant. Also; zcat: /boot/vmlinuz-2.6.5: not in gzip format)
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.

PHP Warning

lib/blame.php:177: Warning: Invalid argument supplied for foreach() (...repeated 3 times)