Decompression method of rar file package in linux

Decompression method of rar file package in linux

In linux, we often encounter some file packages ending in rar. At this time, the decompression cannot be realized by the command of linux itself and yum installation, and the compression software of rar needs to be installed.
We can achieve smooth decompression from the following steps:

One: Download and install rar

Download URL: https://www.rarlab.com/download.htm

What we want to download is: https://www.rarlab.com/rar/rarlinux-x64-612.tar.gz (64-bit)
1. Download
mkdir /mnt/rar_test
wget -P /mnt/rar_test  https://www.rarlab.com/rar/rarlinux-x64-612.tar.gz
2. Unzip
cd /mnt/rar_test
tar -xzvf rarlinux-x64-612.tar.gz
cd rar 
3. Compile and install
make
make install

Two, the installation is successful

After installation, there are two commands rar and unrar, rar is used to compress, and unrar is used to decompress.

3. Introduction to rar command usage

#####1. Compress the /test directory into a test.rar package:

rar a test.rar  /test

#####2. Unzip the test.rar package:

unrar e test.rar

Summary
1. Decompress .tar with tar –xvf
2.
Decompress .tar.gz and *.tgz with tar –xzf
3. Decompress .gz with gzip -d or gunzip
4.
Decompress .rar with unrar e
5. Use .zip unzip decompresses
6,
.bz2 decompresses with bzip2 -d or bunzip2
7, .tar.bz2 decompresses with tar –xjf8
,
.Z decompresses with uncompress9
, *.tar.Z decompresses with tar –xZf

Creator: Wu Zishan

You are welcome to refer to it, and you can also raise questions or different opinions.
Original works, please indicate the source for reprinting! !

Guess you like

Origin blog.csdn.net/Zisson_no_error/article/details/124791652