Install RAR software in Linux

Source: Internet
Author: User
Tags mkdir php and rar

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

See the following information is installed successfully

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 first:

Using Rarlinux

RAR and Unrar command and parameter usage is various, the following only introduces some commonly used command combinations, more detailed usage and instructions please refer to the command RAR--help and Unrar--help

Extracting files

Unrar T <rar_file> command test the files to extract--test only the compressed file is normal, do not do the actual decompression operation


Unrar T Test.rar
Unrar e <rar_file> to extract compressed files to the current directory--The following command extracts the contents of the Test.rar compressed package into the current directory


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


The command extracts the compressed file to the specified directory--The following command extracts the Test.rar compressed file into the/tmp/test/directory


Unrar x test.rar/tmp/test/

Package a file as a compressed file

There is little need to package data into a RAR compressed file under Linux because there are too many forms of data packaging and swapping between Linux and Unix. However, to facilitate the transfer of data with Windows users, learn to use Rarlinux to make. rar compressed files are still needed.

Using Rarlinux, the command format for the. rar file is: RAR a < compressed filename > <file1> <file2> ... <fileN>

The following example compresses image and CSS catalogs, as well as index.php files, into Backup.rar files


RAR a Backup.rar image/css/index.php

The following command compresses all the. 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.