For non-Windows users, files ending in .tar and .tar.gz must be very familiar. Most compilations download large files, we will rarely encounter files with the extension .zip what else .rar. But there is something unique about these files. What is the difference between .tar and .tar.gz?

In contrast to most other applications, where the archiver (a tool for archiving files, aka making more files into one file only) is already packaged with a compressor (a tool to reduce file size). However, in the Linux world, archiving and compressors are different applications.

Tar is the extension, and also the application name of the archiver tool. Only to collect very many files into one file. However, the size remains the same, not reduced by the size of the file returned. There is also Gz, is an extension of the Gzip application that replaces to compress large file sizes, becoming much smaller. Therefore, combined between tar and gzip, usually given an extension with: .tar.gz.
Discuss simple but quite often on Linux because the tar.gz archive format is commonly used for distributing CMS application packages and installers. Not tar from cigarettes you know but we will extract the contents of the file that is compressed with Gunzip.

Different from windows right? Where the archive application is bundled with a compressor. Examples of applications that do this are: winrar, winzip, 7zip. But in the UNIX or Linux family, things like this are not popular. Tarball is the name to identify the files that have been created by the tar application, whether they have been compressed or not. While the task of compressing it is usually done with the Gzip and Bzip2 applications.
Tar files, often called atarball, are collections of files wrapped in one single file for easy storage. Instead of tracking the entire file folder, you only need to track one file. Tar files are often compressed after being created, giving them the .tar.gz file extension. This is technically a TGZ file, but almost everyone calls a simple .tar and .tar.gz file “tar file.”

For those who don’t like to use the terminal, you will be glad to hear that macOS can open tar and tar.gz files by default with Archive Utility. Just double click on the file, and it will extract.

You can also use Unarchiver, which is a free tool for managing archives, functions like an Archive Utility, and supports .rar files as well.

On Windows, you need an external program to open it. 7-Zip is light and does the job well, although it takes two steps to open the tar.gz file. WinRar opens them in one step but is a bit clunkier to use.

Tar is one of the most widely used Linux commands for the compression process. The various advantages that tar has are its own reason why this command is very liked by developers. In this article, we will discuss the meaning of Linux tar and how to use it.

What is Linux Tar?

Tar is an abbreviation of Tape archive and is used to compress a series of files and folders.

Generally, files that have been compressed using the tar command will be saved as .tar files. Subsequent compression using gzip will result in a file in the .tar.gz format.

By using Linux tar, you can compress and decompress files. Tar is equipped with many options and some of which you must remember.

Linux tar advantages:

Tar has a file compression ratio of 50%. This figure shows that files are compressed efficiently
Dramatically reduces file and folder package sizes
Tar does not change the features of files and directories. Permission and other features remain intact even though they are compressed
Tar is run on the most widely used Linux version. This command can be used on Android firmware and also older versions of Linux
Fast compress and decompress
Easy to use

After learning about the advantages of tar, there is one more question that certainly arises in your mind. When is Linux tar being used?

If you are using a Linux based system and need file compression.
To move large files and folders from one server to another
To backup websites, data, or whatever
To reduce the excess memory used in the system. Compression will give more space.
Upload and download folders

How to use Linux Tar

Here you will learn the basic operations that can be done using Linux tar. But before that, you must first log in to the VPS server via SSH. (link entered to SSH section)
Creating .tar Archive Files on Linux

You can make .tar compression for files and directories. Examples of archives are as follows:

tar -cvf sampleArchive.tar / home / sampleArchive

/ home / sampleArchive is a directory that needs to be compressed to create sampleArchive.tar.

The command uses the -cvf option which stands for:

c - to create a new .tar file
v - shows the verbose description of the compression process
f - file name

How do I install the downloaded tar.gz file?
How to install tar.gz file on Ubuntu. How to Install tar.gz downloaded on Ubuntu. Commands for installing tar.gz files on linux – how to extract and install tar.gz files on Ubuntu.

In computing, tar is software used to gather many files into one archive file. This is often referred to as tarball and is used for distribution or backup purposes. Tar names are received from (t) ape (ar) chive.

Tar archive files usually have the .tar suffix, e.g., Package.tar or package.tar.bz2 or package.tar.bz or package.tar.xz. The term tarball is also used to apply tar files.
Install the .tar.gz file or (.tar.bz2)

Installing .tar.gz or .tar.bz2 files is very easy. Ubuntu users can extract the .tar.gz file and compile the program from its source. Follow the steps given below to extract and install the tar.gz file on Ubuntu.

It is recommended to navigate to the .tar.bz folder that is downloaded and opened and read the README file. Installing the installation. If not, you can install .tar.gz or (.tar.bz2) files through the Terminal.

Download the desired .tar.gz or (.tar.bz2) file
Open Terminal
Extract the .tar.gz or (.tar.bz2) file with the following command
tar xvzf PACKAGENAME.tar.gz
tar xvjf PACKAGENAME.tar.bz2
Navigate to the extracted folder using the cd command
cd PACKAGENAME
Now it is ordered to install tarball
./configure
make
sudo do the install

Example

$ sudo apt-get update
$ wget https://dl.winehq.org/wine/source/1.9/wine-1.9.19.tar.bz2
$ sudo tar xzvf wine-1.9.19.tar.bz2
$ cd wine-1.9.19
$ ./configure
$ make
$ sudo make install
$ sudo reboots


Sources:
– https://jagongoding.com/blog/post/perbedaan-antara-tar-dan-gz
– https://id.if-koubou.com/articles/how-to/what-is-a-tar-gz-file-and-how-do-i-open-it.html

LEAVE A REPLY

Please enter your comment!
Please enter your name here