How to solve the problem of garbled characters when decompressing rar in Linux

藏色散人
Release: 2021-12-14 11:12:51
Original
4518 people have browsed it

Solution to decompressing rar garbled characters in Linux: 1. Install RAR for Linux; 2. Open the command window; 3. Decompress it through the unrar decompression program.

How to solve the problem of garbled characters when decompressing rar in Linux

The operating environment of this article: linux5.9.8 system, Dell G3 computer.

How to solve the garbled problem of decompressing rar in linux?

Decompressing rar, zip garbled characters, etc. under linux:

For Window Common compressed files .zip and .rar under Linux also have corresponding methods to decompress them:

1: For .zip

linux provides zip and unzip programs, zip is a compression program , unzip is the decompression program. They have many parameter options. Here is a brief introduction and an example of their usage:

# zip all.zip *.jpg(这条命令是将所有.jpg的文件压缩成一个zip包) # unzip all.zip(这条命令是将all.zip中的所有文件解压出来)
Copy after login

Decompressing ZIP files with garbled characters

unzip -O GBK mycpmpressfile.zip -d filename (用CP936, GB18030也可以,-d 指定要解压缩的路径)
Copy after login

2: For .rar

To process .rar files under Linux, you need to install RAR for Linux, which can be downloaded from the Internet, but remember that RAR for Linux is not free; you can download RAR 3 from http://www.rarsoft.com/download.htm. 60 for Linux, and then install the installation operation as follows:

# tar -xzpvf rarlinux-3.2.0.tar.gz # cd rar # make
Copy after login

In this way, the installation is completed. After installation, there are two programs, rar and unrar. rar is a compression program and unrar is a decompression program. They have many parameter options. Here is an example of their usage.

# rar a all *.jpg
Copy after login

This command is to compress all .jpg files into a rar package named all.rar. The program will automatically append the .rar extension. After the package name.

# unrar x all.rar
Copy after login

This command is to extract all files in all.rar.

ps:

3. For .tar.gz and .tgz

Decompression: tar xzvf all *.tar.gz -C filepath

Compression: tar czvf all *.tar.gz DirName

4.For .tar.bz

Decompression: tar xjvf FileName.tar.bz

Recommended learning: "linux video tutorial"

The above is the detailed content of How to solve the problem of garbled characters when decompressing rar in Linux. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!