Site Menu

Share

LINUX CLASSES - COMPRESSION, ENCODING AND ENCRYPTION

How do I Compress and Decompress My Files?

The compress, uncompress, and zcat Commands

The compress and uncompress programs work just like gzip and gunzip, but they use an older and less efficient compression technique. If you're using Linux, you shouldn't have to bother with compress and uncompress at all. Even if you come across a file created with compress (something with a .Z suffix), you can decompress it with gunzip, because gunzip understands both formats. Still, just for completeness, here's how to use the compress and uncompress programs:

compress some.file Create compressed some.file.Z.
uncompress some.file Create decompressed some.file.

The zcat program is another Linux antique. It does the same thing as uncompress with the -c flag (decompresses and writes output to the pipeline), so the following two commands would be equivalent:

uncompress -c something.tar.X | tar xvf -
zcat something.tar.X | tar xvf -

You should have to use these commands only if you're running some version of Unix besides Linux. (Even then, many Unix systems will have the GNU versions of gzip, gunzip, and tar available.)

Previous Lesson: Compression With Gzip
Next Lesson: Zmore and Zless

[ RETURN TO INDEX ]


   

Comments - most recent first
(Please feel free to answer questions posted by others!)

Majed     (09 Dec 2011, 09:06)
about gzip it's mentioned in the earlier page
Priyanka Gaur     (24 Nov 2010, 15:57)
Its gud. But there is no example at all for related to gzip command of the linux.

I welcome your comments. However... I am puzzled by many people who say "Please send me the Linux tutorial." This website *is* your Linux Tutorial! Read everything here, learn all you can, ask questions if you like. But don't ask me to send what you already have. :-)

NO SPAM! If you post garbage, it will be deleted, and you will be banned.
*Name:
Email:
Notify me about new comments on this page
Hide my email
*Text:
 
 


Ask Bob Rankin - Free Tech Support


Copyright by - Privacy Policy
All rights reserved - Redistribution is allowed only with permission.