Closed Captioning Closed captioning available on our YouTube channel

How to use the bzcat and zcat commands: 2-Minute Linux Tips

Network World | Jun 25, 2021

In this Linux tip, learn how to use the bzcat and zcat commands. They allow you to look at the contents of files compressed with the bzip2 and gzip commands without having to uncompress the files first. Instead, these commands uncompress the files and send the output to standard out while the compressed files are left intact.

Copyright © 2021 IDG Communications, Inc.

Similar
Hi, this is Sandra Henry-Stocker, author of the “Unix as a Second Language” blog on NetworkWorld.
In this Linux tip, we’re going to look at the bzcat and zcat commands. They allow you to look at the contents of files compressed with the bzip2 and gzip commands without having to uncompress the files first. Instead, these commands uncompress the files and send the output to standard out while the compressed files are left intact.
To use bzcat, just point it at the file you want to view. In this example, I’m going to send the output to the head command, so we don’t end up looking at nearly half a million lines.
To use zcat (sometimes installed as gzcat) do the same thing with files compressed with gzip.
Notice that both of the original files are still sitting compressed in my directory.
That’s your Linux tip for the bzcat and zcat commands.
If you have questions or would like to suggest a topic, please add a comment below. And don’t forget to subscribe to the IDG Tech(talk) channel on YouTube.
If you liked this video, please hit the like and share buttons. For more Linux tips, be sure to follow us on Facebook, YouTube and NetworkWorld.com.
Popular
Featured videos from IDG.tv