Install
The rarfile is not supported in liunx. You need to install winrar in liunx as follows:
The code is as follows: |
Copy code |
Wget http://www.rarsoft.com/rar/rarlinux-4.0.1.tar.gz Tar-zxvf rarlinux-4.0.1.tar.gz Cd rar Make 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:
Rar x vpsyou.rar // Extract vpsyou.rar to the current directory
Rar vpsyou.rar./vpsyou.com // package the vpsyou.com directory as vpsyou.rar
Common rar commands include:
A. Add a file to the operation documentation.
For example, rar a test.rar file1.txt if the test.rarfile does not exist, package file1.txt to test.rar.
For example, rar a test.rar file2.txt if the test.rarfile already exists, then the file2.txtfile will be uploaded to test.rar.
(In this example, test.rar contains two files)
Note: if a copy of a file already exists in the operation document, the command updates the file and can also perform operations on the directory.
Example: rar a test.rar dir1
C. Add instructions to the operation document
Rar c test.rar
(The words "Reading comment from stdin" appear, enter one or more lines of comments, and end with ctrl + d)
Cf adds file comments, similar to c above, but this is to annotate each file in the compressed document
Cw writes document comments to files
Example: rar cw test.rar comment.txt
D. Delete an object from the document
Example: rar d test.rar file1.txt
E. Decompress the file to the current directory.
Example: rar e test.rar
Note: When using efor decompression, not only the original file1.txtand file2.txt files are extracted to the current directory, but all the files in dir1
It is also decompressed to the current directory, and the directory structure before compression cannot be maintained. If you want to maintain the directory structure before compression, use x to decompress
K lock document
For example, after rar k test.rar locks the document, it cannot be updated.
R repair document
Example: rar r test.rar
When there is a problem with the rarfile, you can use this command to fix it (the ghost knows how many problems are used)
S conversion document into self-extracting document
Example: rar s test.rar
An executable test. sfx file is generated. Running this file is equivalent to rar x test.rar,
Suitable for transferring files to users without rar
T detection document
Example: rar t test.rar
Test the integrity of test.rar. Generally, it is best to use this command to ensure file correctness before compression of large files for transmission.
X. Extract the content from the file to the current directory.
Example: rar x test.rar
In this way, dir1 maintains the original directory structure.
Possible problems
The following problem occurs when you run the rar command:
Rar:/lib/i686/nosegneg/libc. so.6: version 'glibc _ 000000' not found (required by rar)
Solution:
The code is as follows: |
Copy code |
Cp rar_static/usr/local/bin/rar |