18 Tar Command Examples in Linux

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Use our Linode referral link if you plan to buy VPS (it starts at only $10/month).
  4. Support us via PayPal donate - Make a Donation
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux course in 5 Days

We are thankful for your never ending support.

Ravi Saive

I am Ravi Saive, creator of TecMint. 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. Follow Me: Twitter, Facebook and Google+

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
    OR
    $ tar –extract –file=/tmp/aziz.tar home/aziz/test1

Got something to say? Join the discussion.

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

Join Over 95000+ Linux Users
  1. 77,543
  2. 4,213
  3. 35,218

Enter your email to get latest Linux Howto's