Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to decompress tar File in linux

Shulou Source: shulou.com Published: 2022-06-03 06:52:17 10月04日 Update

How to extract the tar file in linux? I believe there are many people do not understand, today, in order to let you know more about the decompression method of tar files in linux, so give you a summary of the following content, let's look down together.

How to extract the .tar file in linux

1. Packing and compressing

Tar-cvf etc.tar / app/etc # Packaging tar-zcvf pack.tar.gz pack/ # compressed into a .gz format tar-jcvf pack.tar.bz2 pack/ # compressed into a .bz2 format compressed package tar-Jcvf pack.tar.xz pack/ # packaged into a .xz format compressed package

2. Unpack and decompress

Tar-xvf pack.tar # unpack the pack.tar file tar-zxvf pack.tar.gz / pack # unpack the .gz format to the pack folder tar-jxvf pack.tar.bz2 / pack # extract the .bz2 format to the pack folder tar-Jxvf pack.tar.xz / pack # unpack the .xz format to the pack folder

Key explanation: tar tool itself does not have the function of compression, need to be combined with compression tools to achieve better compression.

-j: bzip2

-z: gzip

-J: xz

-c: packing

-x: unpack

These are the details of how to extract the tar file in linux, and do you have anything to gain after reading it? If you want to know more about it, welcome to the industry information!

Tags: Documents formats contents folders tools functions that is methods more look industry information key points explanation Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker Apple macOS Xiaomi Shulou Technology