18 Tar Command Examples in Linux

Download Your Free eBooks NOW - 10 Free Linux eBooks for Administrators

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.

Receive Your Free Complimentary eBook NOW! -

Download Free Linux eBooks

Advanced Bash-Scripting Guide
Linux Bible
A Newbie's Getting Started Guide to Linux
Ubuntu Linux Toolbox: 1000+ Commands

You may also like...

66 Responses

  1. Ahmad Joya says:

    Thanks a lot.
    very useful topics!

  2. Abhijit says:

    I think on on example 5 and 6 for untaring, -z and -b flags respectively are missing. But anyway thanks for this great tutorial.

  3. jagadish says:

    nice explanation……..

  4. Gabriel S says:

    I’ve got this bookmarked! It’s really helpful – thanks for posting this. I refer to it constantly when I’m SSHing and moving WordPress installations around!

  5. Swati says:

    Hi Ravi,
    I am trying to create tar file at AIX server using the below command:
    tar cvf temp.tar temp/
    but its just giving me tar: and create 0 byte tar file.
    I tried diffrent options like tar -cvf, tar cf, tar -cf, temp/,temp, complete path but for all I m getting same reposne.
    Please help :(

  6. MADHU says:

    Good read, useful information . I also would like to understand how we can overwrite the file in the directories if already exist.

  7. Dev says:

    Thanks guys,
    This is really very helpful for all archiving formats :)

  8. Ahmed says:

    Salaam Ravi,

    Thanks for this valuable tricks and tips, personally it helped me a lot.
    By the way I am new bie to linux.

    Ahmed Somali

  9. Franklin says:

    Note to the author:

    some of the filename is you tar examples look like adult photos to me (e.g. Miley**photo101203.flv). Just want to let you know in case that was not on purpose…

    Thanks for the helpful tutorial.

    • Ravi Saive says:

      @Franklin,
      What a finding….:) even I don’t know that I’ve used such images in my tar command examples. Actually I handle one large photo site in our media company. I think I tried those commands on that server and taken those images as example for tar command…..

  10. langacker says:

    Thanks! Great tutorial for linux beginner!

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Join Over 70000+ Linux Users
  1. 48590
  2. 2375
  3. 13200

Enter your email to get latest Linux Howto's