
# tar -zxvf archive_ -C /tmp/extract_here/ TAR.BZ2 Files in Linux Like with the tar format you can optionally extract the files to a different directory:
UNZIP TAR FILE ARCHIVE
This will extract the files in the archive_ archive in the current directory. To decompress an archive use the following syntax: # tar -zcvf archive_ directory_to_compress To compress a directory use the following syntax: It gives very good compression while not utilizing too much of the CPU while it is compressing the data. This format is my weapon of choice for most compression. # tar -xvf archive_name.tar -C /tmp/extract_here/ TAR.GZ Files in Linux This will extract the files in the archive_name.tar archive in the current directory. # tar -cvf archive_name.tar directory_to_compress

Tar is probably the Linux/UNIX version of zip – quick and dirty. The advantage with tar is that it consumes very little time and CPU to compress files, but the compression isn’t very much either. Tar is a very commonly used archiving format on Linux systems. # unzip archive_name.zip TAR Files in Linux # zip -r archive_name.zip directory_to_compress To compress a directory with zip do the following: Tar.gz and tar.bz2 are far superior in that respect. The downside of the zip format is that it does not offer the best level of compression. Its biggest advantage is the fact that it is available on all operating system platforms such as Linux, Windows, and Mac OS, and generally supported out of the box. Zip is probably the most commonly used archiving format out there today. I like to use the tar.gz format for files that I would only use on my Mac and Linux machines. I use the zip format for files that I might need to share with Windows users. This is because zip has become the de-facto standard choice for data compression, and it works on Windows as well. The zip format is definitely one of them. I’ve realized that I need two or three formats of compression that I’m comfortable using, and stick to them. I’m talking about only a few data compression formats here, and there are many more out there.
UNZIP TAR FILE HOW TO
Quick Note: If you’re looking for the Windows version of this tutorial, you can find it at How to Open tar.gz Files in Windows.īefore we delve into the usage of the formats I’d like to share some of my experience using the various formats of archiving. These are some of the most popular formats for compression used on Linux machines. We’ll cover the basic usage of zip, tar, tar.gz and the tar.bz2 formats.


I’ll run you through using some of these formats to compress and decompress files and directories on a Linux machine. There are compression formats out there which allow us to sometimes compress our data by 60% or more.
UNZIP TAR FILE ZIP FILE
Whether it’s a zip file containing images to be sent in a mail or a compressed data backup stored on a server, we use data compression to save valuable hard drive space or to make the downloading of files easier. Backgroundĭata compression has been extremely useful to us over the years. TAR.GZ files in the Linux operating system. This guide will explain how to create and/or open and extract the contents of.
