Article directory
LinuxThe decompression command below is a bit complicated, such as: 7z, gz2, bz2, rar...
But after reading this article, you will find that it is not complicated, haha~~
tar decompression command
Common parameters and examples of the tar command.
Required parameters: (3 parameters cannot coexist)
- -c: Create a compressed file c is create.
- -x: unzip the file
- t: View the files in the compressed package
Auxiliary parameters:
- -z: compress/decompress with gzip
- -j: use bzip2 to compress/decompress
- -v: show compression/decompression progress bar
- -f: use the file name (note: do not connect the parameters after f, that is, -zxfv is wrong, write -zxvf)
tar decompression example
tar.bz2 unzip file ▼
tar -zxvf abc.tar.bz2
- (unpack abc.tar.bz2)
Create tar.bz2 compressed file ▼
tar -zcvf abc.tar.bz2 one.mp3 two.mp3
- (compress one.mp3 and two.mp3 to abc.tar.bz2)
Rar format decompression command
As rarlinux is paidsoftware, we must first download rarlinux and then install it.
installation method:Download and install the rarlinux package
tar -zxvf rarlinux.tar.gz cd ./rarlinux make && make install
Rar decompression example ▼
unrar e filesname.rar
7z file decompression example
Redhat, Fedora,Centosinstallation command ▼
yum install p7zip
Debian, Ubuntu installation commands ▼
apt-get install p7zip
Decompression example ▼
7za x filename.7z
Hope Chen Weiliang Blog ( https://www.chenweiliang.com/ ) shared "Linux decompression tar, rar, 7z command parameter tutorial and example", to help you.
Welcome to share the link of this article:https://www.chenweiliang.com/cwl-1626.html
Welcome to the Telegram channel of Chen Weiliang's blog to get the latest updates!
📚 This guide contains huge value, 🌟This is a rare opportunity, don’t miss it! ⏰⌛💨
Share and like if you like!
Your sharing and likes are our continuous motivation!