How to decompress RAR and ZIP files under CentOS

RAR files are not supported by default under Linux. If you want to decompress RAR files, you need to download the winrar software package.

Our common compression format is usually .zip..gz.bz2.tar.gz.tar.bz2, etc.

By default, Linux does not support ZIP and RAR, and specific software packages need to be installed.

RAR files are not supported by default under Linux. If you want to decompress RAR files, you need to download the winrar software package.

wget https://www.rarlab.com/rar/rarlinux-x64-5.9.b3.tar.gz

The above download is the 64-bit Linux version of winrar. For more versions, please visit the official website to downloadhttps://www.rarlab.com/download.htm

After downloading to the serverdocument

tar -zxvf rarlinux-x64-5.9.b3.tar.gz cd rar make

After successful installation, you can use the rar command to decompress it.

Unzip uzbox.rar to the current directory

rar x uzbox.rar

Compress the boxpu.com directory into uzbox.rar

rar uzbox.rar ./boxpu.com/

The unzipped ZIP file can be installed via yum

The installation command is:

yum install -y unzip zip

zip is the compression command, and unzip is the decompression command.

Unzip to the current directory

Enter the command:

unzip uzbox.zip

Unzip to the specified directory but do not overwrite it

Enter the command:

unzip -n uzbox.zip -d /usr

Unzip uzbox.zip to the usr folder in the root directory.

unzip -n uzbox.zip

Unzip to the current folder.

View the contents of the compressed file

Enter the command:

unzip -v uzbox.zip
score

Leave a Reply

Your email address will not be published. Required fields are marked *