Install rar decompression software in linux

Source: Internet
Author: User

The rarfile cannot be decompressed normally in linux. If you want to decompress the rarfile in linux, you must first install a rarlinux software in the system.

Install rarlinux

Wget http://www.rarsoft.com/rar/rarlinux-4.0.1.tar.gz
Tar-zxvf rarlinux-4.0.1.tar.gz
Cd rar
Make

The following information indicates that the installation is successful.

Mkdir-p/usr/local/bin
Mkdir-p/usr/local/lib
Cp rar unrar/usr/local/bin
Cp rarfiles. lst/etc
Cp default. sfx/usr/local/lib

Remember two Common commands:

Use rarlinux

The commands and parameters of rar and unrar are used in a variety of ways. The following describes only common command combinations. For more usage and instructions, refer to the commands rar -- help and unrar -- help.
 

Decompress the file

Unrar t <rar_file> command to test the file to be decompressed -- only test whether the compressed file is normal and the actual decompression operation is not performed


Unrar t test.rar
Unrar e <rar_file> command to decompress the compressed file to the current directory -- the following command decompress the content of the test.rar compressed package to the current directory


Unrar e test.rar
Unrar x <rar_file> <directory>


Command to decompress the compressed file to the specified directory-the following command decompress the test.rar compressed file to the/tmp/test/directory


Unrar x test.rar/tmp/test/
 

Package the file into a compressed file

In Linux, data is rarely packaged as RAR compressed files, because there are too many data packages and exchanges between Linux and Unix. However, to facilitate data transfer with Windows users, you still need to use rarlinux to create. rar compressed files.

Use rarlinux to format the command for creating a. rar file: rar a <compressed file name> <file1> <file2>... <fileN>

The following example compresses the image and css directories and index. php files into backup.rar files.


Rar a backup.rar image/css/index. php

The following command compresses all. php and. html files into web.rar files


Rar a web.rar *. php *. html

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.