• 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. How to gzip all or specific files in Linux
  2. swapoff: command not found
  3. pidstat Command Examples in Linux
  4. daemonize Command Examples in Linux
  5. How to configure and Manage Network Connections using nmcli
  6. create_ap: command not found
  7. egrep Command Examples in Linux
  8. How to Create Yum Repository For System Packages Installation in CentOS/RHEL
  9. CentOS / RHEL 4 : How to install and configure FTP server (vsftpd)
  10. Integrate Linux Servers with Active Directory using Samba, Winbind, and Kerberos

You May Also Like

Primary Sidebar

Recent Posts

  • aws ec2: CLI for AWS EC2 (Command Examples)
  • aws cur – Create, query, and delete AWS usage report definitions (Command Examples)
  • aws configure – Manage configuration for the AWS CLI (Command Examples)
  • aws cognito-idp: Manage Amazon Cognito user pool and its users and groups using the CLI

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright