18 Tar Command Examples in Linux

If you have any questions or problems regarding this article and want help within 24 Hours? Ask Now

Support TecMint: Did you find this tutorial helpful?. Please help to keep it alive by donating. Every cent counts! - Donate Now

Ravi Saive

Simple Word a Computer Geek and Linux Guru who loves to share tricks and tips on Internet. Most Of My Servers runs on Open Source Platform called Linux.

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

Receive Your Free Complimentary eBook NOW! -

Download Free Linux eBooks

Advanced Bash-Scripting Guide
Linux Bible
A Newbie's Getting Started Guide to Linux
Introduction to Linux - A Hands on Guide

You may also like...

70 Responses

  1. While extracting a particular file from the tarball, just giving a file name doesn’t work. You need to give the path of the file within the tarball.
    For example: I have taken a backup of my home directory called “/home/aziz” and it contains test1 and test2 files.

    $ tar -xvf /tmp/aziz.tar test1 — This command does not work while extracting a particular called test1
    $ tar -xvf /tmp/aziz.tar home/aziz/test1 — This command works while extracting a file called test1
    $ tar –extract –file=/tmp/aziz.tar home/aziz/test1

Leave a Reply

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

Join Over 95000+ Linux Users
  1. 57,739
  2. 3,201
  3. 25,639

Enter your email to get latest Linux Howto's