Suse & OpenSuse : Tips, Tricks, Tutorials, How Tos and Troubleshooting

What are .Z, .gz and .bz2 files?

As part of a tarball distribution and also other compressed files, you will come across files with the .Z, .gz and .bz2 extensions.  These are basically files that have been compressed using different applications, much like the .zip files predominantly found in the Windows environment.

file-compression


compress for .Z files

The UNIX command compress is used to create and extract files with the .Z extension.  Unfortunately, this is not available on SuSE.  If you need to uncompress .Z files that you downloaded, you can use the command zcat.

gzip and gunzip for .gz files

This is the more common compression program and algorithm that’s used with Linux.

# gzip <filename>
# gunzip <filename>.gz

bzip2 and bunzip2 for .bz2 files

Known to have a more superior compression ratio than gzip but less frequently used.

# bzip2 <filename>
# bunzip2 <filename>.bz2

zip and unzip for .zip files

Being in a world where Windows seems to be the norm, we can’t avoid receiving file that’s compressed with WinZIP or other tools that create .zip file.  Luckily for us, we have zip and unzip for these files.

# zip <archive>.ZIP <filenames>
# unzip <archive>.ZIP

Please comment if you have any further questions.

RSS feed | Trackback URI

Comments »

No comments yet.

Name (required)
E-mail (required - never shown publicly)
URI
Your Comment (smaller size | larger size)
You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> in your comment.