• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

zcat Command Examples in Linux

by admin

The zcat command dumps uncompressed data from a .gz file to stdout without recreating the original file. The .gz file remains intact.

Syntax:

$ zcat [options] [files]

Example:

$ ls
test.gz
$ zcat test.gz
A test file
# file test contains a line "A test file"
$ ls
test.gz

zcat Command Examples

1. To read zipped file:

# zcat text.gz

2. To see compressed file stats:

# zcat -l

3. To get the software lisence:

# zcat -L

4. To see the version of the zcat:

# zcat -V

zcat reads one or more files that have been compressed with gzip or compress and write them to standard output. Read standard input if no files are specified or if – is specified as one of the files; end input with EOF. zcat is identical to gunzip -c and takes the options described for gzip/gunzip.

Filed Under: Linux

Some more articles you might also be interested in …

  1. How to Create and Query a BTRFS File System
  2. tlp-stat: command not found
  3. envoy: A PHP-based task manager for Laravel remote servers
  4. rankmirrors Command Examples in Linux
  5. lambo Command Examples
  6. lvcreate/lvremove Failed with Error “Can’t remove merging snapshot logical volume”
  7. rkhunter Command Examples in Linux
  8. amass enum – Find subdomains of a domain (Command Examples)
  9. lsusb Command Examples in Linux
  10. How to format code within web pages

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright