
Syntax: tar -xvf eduCBA-demo.tar -C desiredLoc
Linux untar gz archive#
Untar tar archive File at the desired location A similar explanation goes for the below 2 examples (for tar.gz and tar.bz2). Here we see that at first, there are no such files present while we have the directory, but as we untar the file, all the file contents get extracted and uncompressed to the location where we are running the command from.

With all the utilities mentioned above, this command becomes an inadvertent skill set any Linux developer possesses. Using the –delete option assists the user in deleting a specific file in a tar archive.
Linux untar gz full#
The history behind tar is in early times, the tar file format was used to create archives to store files on magnetic tape, and hence the full form of tar is Tape ARchive. Recently, most of our files downloaded from the internet have been compressed using a particular compression format, where a few formats are tar, tar.gz, and tar.bz2. Syntax: tar -xvf -wildcards ‘’ How does Untar Command work in Linux? Extract all files from the tar Archive File matching a particular file regex Extract a single file from the tar Archive Fileĩ. List the Content of tar.bz2 Archive FileĨ.

Untar tar archive File at the desired locationħ. In Linux, there are fewer options available for untar compared to other extensively used commands, and we will discuss all of those in detail here in this section later in the article, take a dig at the working of untar commands in Linux.Ĥ.

In this article, we will go through all the command utilities and take deep dive using some examples to understand them in even greater detail! Listing content and extracting a single file or directory are some of the widely used utilities of the command untar. It first helps the user to extract or, in other words, unpack files in the compressed mode, and once the unpacking or extraction is done, the command helps the user to uncompress the same. This command is used for 2 specific utilities in file operations. Untar is a command that enables users to extract compressed files with tar, tar.gz, and tar.bz2 compression formats.
