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 the installation package, decompress and install wgethttp: // www.rarsoft.com/rar/rarlinux-3
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
<命令>
-
<选项1>
.... -
<选项n>
<Operation documentation>
<文件…>
<@ File list…>
<解压路径>
| A |
Add a file to a compressed file |
| C |
Add compressed file comments |
| Cf |
Add file comment |
| Cw |
Write compressed file comments to file |
| D |
Delete files in a compressed file |
| E |
Decompress the compressed file to the current directory. |
| F |
Refresh the files in the compressed file |
| I [parameter] = <串> |
Search for strings in a compressed file |
| K |
Lock compressed files |
| L [t, B] |
List compressed files [technical information, concise] |
| M [f] |
Move to a compressed file [only for files] |
| P |
Print files to standard output devices |
| R |
Fix compressed files |
| Rc |
Recreate the lost volume |
| Rn |
Rename a compressed file |
| Rr [N] |
Add data recovery Records |
| Rv [N] |
Create recovery volume |
| S [name |-] |
Convert the compressed file to the self-decompressed format or convert it back to the compressed file |
| T |
Test compressed files |
| U |
Update files in compressed files |
| V [t, B] |
Detailed list of compressed files [technical information, concise] |
| X |
Extract files from the absolute path |