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

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • 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. rm Command Examples in Linux
  2. ip Command Examples to Manage Networking in Linux
  3. What are Bash Exit Codes in Linux
  4. How to Re-Balance BTRFS to Free Disk Space
  5. Basic vi commands (cheat sheet)
  6. Unable To Extend LVM File System with Associated Snapshot in CentOS/RHEL
  7. How to move /var on a separate disk as a separate mount point (Online)
  8. CentOS/RHEL – vgs command reports error: “global/global_filter” unknown
  9. How to Configure Proxy in CentOS/RHEL/Fedora
  10. How to extend an LVM swap partition in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • vgextend Command Examples in Linux
  • setpci command – configure PCI device
  • db_load command – generate db database
  • bsdtar command – Read and write tape archive files

© 2022 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright