Read more

Unpack a .tar.gz archive

Henning Koch
June 12, 2011Software engineer at makandra GmbH

You can unpack a .tar.gz file into the current directory like this:

tar -xzvf archive.tar.gz
Illustration web development

Do you need DevOps-experts?

Your development team has a full backlog? No time for infrastructure architecture? Our DevOps team is ready to support you!

  • We build reliable cloud solutions with Infrastructure as code
  • We are experts in security, Linux and databases
  • We support your dev team to perform
Read more Show archive.org snapshot

The options used are

-x
: Extract

-z
: Unzip

-f
: Process a file input

-v
: Be verbose, i.e. print each extracted file

Side notes:

  • The dash is optional (tar xzvf ... works as well).
  • For .tar.bz2 archives, use j instead of z (tar xjvf ...`)
  • In order to create a *.tar.gz archive, use -c flag instead of -x flag.
  • The order of parameters matters.
Posted by Henning Koch to makandra dev (2011-06-12 20:12)