Installation of the Linux system RAR and Unrar commands

Source: Internet
Author: User
Tags rar centos


in the 3.8.0 version, for example, if it is a 64-bit platform, execute the following command, or go to the official website:) Download the latest version:
wget http://www.rarlab.com/rar/rarlinux-x64-4.2.0.tar.gz
RAR software does not need to install, extract directly to/usr/local, the following operations need to have root permissions.
#tar zxvf rarlinux-x64-4.2.0.tar.gz-c/usr/local
At this point, the RAR command and the Unrar command are available under/usr/local/rar. You can create a/usr/local/bin
Connect
#ln-S/usr/local/rar/rar/usr/local/bin/rar
#ln-S/usr/local/rar/unrar/usr/local /bin/unrar
Use method: RAR command Use Method
A add a file to a compressed file
C Add a compressed file annotation (the maximum size of the note cannot exceed 62000 bytes)
CF Add File notes (displays file notes when using the ' V ' parameter). Maximum cannot exceed 32767 bytes)
CH Change compressed file parameter
CW writes file notes to specified files
D delete files from file
E Extract files to current directory (do not create any subdirectories)
F Refresh files in file ( Update these files since they were packaged and not add new to the compressed file
I[par]=<str> Find specific characters in the file
K locks the file (any commands that attempt to change the contents of the compressed file are ignored)
L[t,b] list the files [Technical, Bare]
M[f] moves to a compressed archive [files only]
P print files to standard output
R patch compressed files
RC rebuild missing volumes
RN rename compressed files file
Rr[n] Add data recovery record
Rv[n] Create recovery The conversion between volume
s[name|-] compressed archives and SFX (self-extracting document)
T Test compressed profile
U update files in archive
V[t,b] list the details of a compressed file [Technical,bare]
X Extract to full path

Example: rar a anaconda-ks.cfg.rar anaconda-ks.cfg

Decompression Command Unrar use:

$unrar –help

Usage: Unrar <command>-<switch 1>-<switch n> <archive> <files...>
< @listfiles ...> <path_to_extract\>

< command >
E Extract files to current directory

L[T,B] Lists compressed document information [technical, bare]
P print files to standard output

T test compression I'm Russian when

V[T,B] Lists the details of the compressed document [Technical,bare]

X extract files to full path

[Root@localhost ~]# unrar e anaconda-ks.cfg.rar/home/


Common RAR Command:
RAR x Centos.rar//decompression Centos.rar to current directory
RAR centos.rar./piaoyi.org///Package piaoyi.org directory as Centos.rar
But it is easy to recommend the use of zip compression and decompression, because the zip is generally the Linux system from the belt:
1, Zip
Zip-r Myfile.zip./web

Compresses all files and folders under the Web in the current directory into Myfile.zip files,-r means all files under a recursive compression subdirectory.
2, Unzip
Unzip-o-d/home/sunny Myfile.zip

Extract the Myfile.zip file to the/home/sunny/
-O: Overwrite files without prompting;
-d:-d/home/sunny to extract the file into the/home/sunny directory;
Common error cause Analysis:
1, if you run the command RAR, the following problem occurs
RAR:/lib/i686/nosegneg/libc.so.6:version ' glibc_2.7 ' not found (required by RAR)

Solution:
CP Rar_static/usr/local/bin/rar
2, use RAR when there are errors
BASH:/usr/local/bin/rar:/lib/ld-linux.so.2:bad ELF interpreter:no such file or directory

Because 32-bit programs are installed in a 64-bit system, the workaround:
Yum Install glibc.i686
3, reinstall glibc.i686 after the following similar error
Error while loading shared Libraries:libstdc++.so.6:cannot open Shared object file:no such file or directory

To continue with the installation package:
Yum Install libstdc++.so.6


Supplementary foreign Sources:
Install Rar/unrar CentOS 6
For the bit
Install Unrar CentOS x64
#wget http://pkgs.repoforge.org/unrar/unrar-4.0.7-1.el6.rf.x86_64.rpm
#rpm-UVH unrar-4.0.7-1.el6.rf.x86_64.rpm
Install RAR CentOS x64
#wget http://pkgs.repoforge.org/rar/rar-3.8.0-1.el6.rf.x86_64.rpm
#rpm-UVH rar-3.8.0-1.el6.rf.x86_64.rpm


For bit
Install Unrar CentOS 32
#wget http://pkgs.repoforge.org/unrar/unrar-4.0.7-1.el6.rf.i686.rpm
#rpm-UVH unrar-4.0.7-1.el6.rf.i686.rpm

Install RAR CentOS 32
#wget http://pkgs.repoforge.org/rar/rar-3.8.0-1.el6.rf.i686.rpm
#rpm-UVH rar-3.8.0-1.el6.rf.i686.rpm

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.