How To Unzip tar.gz File?

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/unzip-tar-gz-file/
PINTEREST
PINTEREST
INSTAGRAM

Compression provides more disk space and network efficiency in IT systems. There are different type, level and performance compression algorithms. tar.gz is de facto standard for Linux systems for a long time. In this tutorial we will look different ways to unzip or uncompres tar.gz files.

Unzip with tar

tar is our old friend which can provide compress and decompress of a lot of different compression formats. We will unzip test.tar.gz in this example with x,v  and f options.

  • x is used to extract
  • vis used for verbose mode
  • f is used for file mode

Unzip with tar

Unzip with tar

Unzip with gunzip

gunzip is the unzip command provided by gzip suite. We can use this command without any option in order to unzip. But in this example we use -voption which is used for verbose mode.

Unzip with gunzip

Unzip with gunzip

Unzip with 7z

7z  is my favouritte compression algorithm and tool. It supports a lot of formats from zip to rar. gz format is also supported. We can provide e option in order to extract the tar.gz . 7z automatically detects the format.

Unzip with 7z

Unzip with 7z

List tar.gz Contents

If we want to unzip only some of files from a tar.gz archive first we need to list files. We can list files different ways but we will look only single command which is tar .

List tar.gz Contents

List tar.gz Contents

Unzip Only Specified Directory

If we need to extract only some of files or directories we need to specify them. We will use unzip command and provide the files and directories at the end of command we want to extract. In this example we will extract file oldbackup/db.conf file from tar.gz file.

LEARN MORE  How To Install Tar.Gz or Tar.Bz2 Application Source Code?

Unzip Only Specified Directory

Unzip Only Specified Directory

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/unzip-tar-gz-file/
PINTEREST
PINTEREST
INSTAGRAM

You may also like...

Leave a Reply

Your email address will not be published.

Enjoy this blog? Please spread the word :)