Linux z commands: zcat, zcmp, zdiff, zgrep

Linux z commands are very useful commands. Some of the z command are temporally uncompress in /tmp directory to perform the operation. It gives a peace of mind, as you don’t have to worry about the overhead of uncompression.

Z Commands

Here’s the list of useful z commands.

zcommands

Open/View compressed file
[root@wace lampp]# zcat filename.gz | less

With above command any compressed file with .gz extension can be open or viewed easily.

Compare compressed file
[root@wace lampp]# zcmp filename1.gz filename2.gz

The above command compare two uncompressed file.

Diff compressed file
[root@wace lampp]# zdiff filename1 filename2

The above command find the difference between two compressed file.

Conclusion:

Z Commands makes our day to day task very easy. We don’t have to invest time in uncompress.

 

Leave a Reply

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