Deprecated: sanitize_url is deprecated since version 2.8.0! Use esc_url_raw() instead. in /var/www/linuxwebdevelopment.com/wp-includes/functions.php on line 5211

How To Extract A Tar File In Linux

Extracting a tar file in Linux is very straightforward. You can use the same command to extract almost any kind of tar file: .tar.gz, .tar.bz2, and .tar.xz.

How To Extract A Tar File In Linux

Let’s assume that you have a tar file named example.tar.gz.

To extract the contents of this file, all you would need to do is:

tar xfv example.tar.gz

Similarly, if we had a file named example2.tar.bz2, we could extract its contents with:

tar xfv example2.tar.bz2

If we had a file named example3.tar.xz, we could extract its contents with:

tar xfv example2.tar.bz2

Want to learn how to compress a file or folder in Linux? Then read our article titled How To Compress A File or Folder With Tar In Linux

What did you think of this article? Do you have anything to add? Let’s discuss it in the comments below.

Posted on Categories LinuxTags

Leave a Reply

Your email address will not be published. Required fields are marked *