Install LinuxRAR on Centos
In Windows, we usually compress files more easily or use RAR. By default, Linux does not support RAR compression and decompression. in Linux, RAR software [LinuxRAR] is also free of charge!
Run the following command to download and unzip the installation package:
wget http://www.rarsoft.com/rar/rarlinux-3.9.3.tar.gz
tar -xvf rarlinux-3.9.3.tar.gz
cd rar
make
The following information is displayed after execution:
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
If the following problem occurs when running the command rar,
Rar:/lib/i686/nosegneg/libc. so.6: version 'glibc _ 2.7 'not found (required by rar)
Solution:
cp rar_static /usr/local/bin/rar
Common commands:
Rar x meidahua.rar // extract meidahua.rar to the current directory
Rar a meidahua.rar meidahua.com // package the meidahua.com directory as meidahua.rar
LinuxRAR command details
Usage: rar <command>-<Option 1> .... -<Option N> <operation documentation> <file...> <@ File list…> <Decompression path>
A. add files to compressed files c. Add compressed files comments cf add files comments cw write compressed files comments to files d. delete files in compressed files e. decompress the compressed files to the current directory f. Refresh the compressed files file I [parameter] = <string> Search for string k in the compressed file to lock the compressed file l [t, b] list compressed files [technical information, concise] m [f] Move to compressed file [only file] p print file to standard output device r repair compressed file rc reconstruction lost volume rn rename compressed file rr [N] add data recovery record rv [N] Create recovery volume s [name |-] convert compressed file to self-decompressed format or convert back to compressed file t test compressed file u update compressed file v [t, b] detailed list of compressed files [technical information, concise] x decompress files using absolute paths