• Contact
  • Contact Us
  • Disclamer
  • Home 1
  • Home 2
  • Home 3
  • Privacy Policy
Thursday, June 12, 2025
How VPS - How to use/setup VPS
  • Login
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
How VPS - How to use/setup VPS
No Result
View All Result
Home Operating System Linux

Linux zcat Command Examples for Newbies

How VPS by How VPS
November 2, 2018
in Linux, Operating System
0
0
SHARES
39
VIEWS
Share on FacebookShare on Twitter

Normally, files compressed using gzip can be restored to their original form using gzip -d or gunzip commands. What if you want to view the contents of a compressed file without uncompressing it? For this purpose, you need the zcat command utility.

Read Also: 18 tar Command Examples in Linux

Zcat is a command line utility for viewing the contents of a compressed file without literally uncompressing it. It expands a compressed file to standard output allowing you to have a look at its contents. In addition, zcat is identical to running gunzip -c command. In this guide, we will explain zcat command examples for beginners.

1. The first example shows how to view contents of a normal file using cat command, compress it using gzip command and view the contents of the zipped file using zcat as shown.

$ cat users.list 
$ gzip users.list
$ zcat users.list.gz
Linux zcat Command Examples for Newbies

View Compressed File Contents in Linux

2. To view multiple compressed files, use the following command with filenames as shown.

$ zcat users.list.gz apps.list.gz
Linux zcat Command Examples for Newbies

View Multiple Compressed Files Content in Linux

3. To view contents of normal files use the -f flag, similar to cat command, for example.

$ zcat -f users.list
Linux zcat Command Examples for Newbies

View Linux File Contents

4. To enable pagination, you can use the more and less commands as shown (Also read: Why ‘less’ is Faster Than ‘more’ Command in Linux).

$ zcat users.list.gz | more
$ zcat users.list.gz | less

5. To get the properties (compressed size, uncompressed size, ratio – compression ratio (0.0% if unknown), uncompressed_name (name of the uncompressed file) of a compressed file, use the -l flag.

$ zcat -l users.list.gz  
Linux zcat Command Examples for Newbies

View Compressed File Properties in Linux

6. To suppress all warnings, use the -q flag as shown.

$ zcat -q users.list.gz

For more information, see the zcat man page.

$ man zcat

You might also like to read these following related articles.

  1. ccat – Show ‘cat Command’ Output with Syntax Highlighting or Colorizing
  2. How to Use ‘cat’ and ‘tac’ Commands with Examples in Linux
  3. Manage Files Effectively using head, tail and cat Commands in Linux
  4. How to Backup or Clone Linux Partitions Using ‘cat’ Command

That’s all! In this short article, we’ve explained zcat command examples for beginners. Share your thoughts with us in the comments section below.

Source: tecmint.com

Tags: Linux Commandslinux guidelinux vps setup guide
Previous Post

10 sFTP Command Examples to Transfer Files on Remote Servers in Linux

Next Post

fdupes – A Command Line Tool to Find and Delete Duplicate Files in Linux

Next Post

fdupes – A Command Line Tool to Find and Delete Duplicate Files in Linux

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

No Result
View All Result

Recent Post

Install Imagemagick on CentOS
CentOS

Install Imagemagick on CentOS

by How VPS
June 28, 2023
0

This is how I installed Imagemagick on a vanilla CentOS server Start off by installing the prerequisites yum install php-pear...

Read more
how to Check phpinfo

How to Check phpinfo of Hosting or VPS?

June 28, 2023
Failed to download metadata for repo 'appstream' on Centos 8

How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

February 25, 2022
How to Fix MySQL Error "Plugin 'InnoDB' registration as a STORAGE ENGINE failed"?

How to Fix MySQL Error “Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed”?

November 17, 2020
How to optimize Mysql or MariaDB

How to optimize Mysql or MariaDB

November 3, 2020

Recent News

  • Install Imagemagick on CentOS
  • How to Check phpinfo of Hosting or VPS?
  • How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

Category

  • Arch
  • Authentication
  • Backups
  • BSD
  • Centmin Mod
  • CentOS
  • Control Panels
  • CoreOS
  • CWP
  • Debian
  • Directadmin
  • Encryption
  • Fedora
  • Firewalls
  • Hocvps Script
  • Hosting providers
  • Kloxo-MR
  • Linux
  • Mitigations
  • Operating System
  • Plesk
  • Reviews
  • Securing VPS/Servers
  • Security Patches
  • SSL Certificates
  • Uncategorized
  • Upgrading
  • VPS/Servers management guides
  • Vulnerability Detection
  • Web servers software
  • Webhosting Control Panel
  • About
  • Advertise
  • Careers
  • Contact

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In