Linux-unrar Decompression __linux

Source: Internet
Author: User
Tags rar stdin

Decompression Command Unrar use:



$unrar--help

Usage: Unrar <command>-<switch 1>-<switchn> <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


The following is the < options > section, omitted.

Unrar's command and RAR have the same effect, you can see that Unrar only contains a part of the RAR, so use RAR can complete all operations.



Example 1: Add a file or directory to a compressed file, use a command. For example, add File Files1 to Abc.rar, use a or M command, a command to add file1 file to Abc.rar file to keep the original file1 file unchanged, M command to move file1 files to File1.rar file ( The original file1 file will be deleted when the compression is complete, note that the M command operates only on files $rar a abc.rar file1

Note: If the Abc.rar file does not exist at this time, will create abc.rar files, if the Abc.rar file already exists, the File1 file compression into the Abc.rar files, if Abc.rar file already exists in a file1 files, will update the File1 file. And the original File1 file still exists in the current directory, to move the file1 file to File1.rar, use the M command, which is also available for the directory.
Note: If you enter only the "RAR afile1.rar" command without a file name or directory name, all files and folders in the current directory are compacted into the File1.rar document. Pay attention to this point.

Example 2: Extract the contents of the Abc.rar file by using the E or X command, assuming that there is a file named File1 in the Abc.rar directory and a directory named Test, with a file named File2 in the test directory.
$rar e Abc.rar

Note: Using the e command, the File1 file in Abc.rar is extracted to the current directory, along with the File2 file in the test directory. If you want to keep the directory structure in the Abc.rar directory, use the x command.
$rar x Abc.rar

Description: This will extract the File1 file and test directory to the current folder.

Example 3: Add a comment for the entire compressed file
$rar C Abc.rar

Note: When you enter this command, the bottom of the screen will display
Processing archive test.
Rarreading comment from stdin

And there is a cursor in the blink, from the cursor blinking position input annotation information, finished press Ctrl+d end input

Example 4: Add a comment for a single file in a compressed file, using the CF command. If you want to add a comment to the file1 file in the Abc.rar archive now
$rar CH Abc.rar file1

At the bottom of the screen you will see
Reading comment for abc.rar:file1 from stdin

Flash out of the cursor enter the comment you want to add for file1, Ctrl+d end the input

Example 4: Write the entire file annotation to a file, using the CW command. Join to write Abc.rar comments to the Test.txt file
$rar CW Abc.rar Test.txt

Description: If a file named Test.txt does not exist in the current directory, a file named Test.txt is created and the Abc.rar annotation is written to the Text.txt file, and if a file named Text.txt already exists in the current directory, you are prompted to overwrite the existing file, such as If you select Yes or all, the contents of the test.txt are emptied and the Abc.rar annotation content is written to the Text.txt file.

Example 4: Delete files or directories in the compressed file, using the D command. For example, to delete a file1 file in a Abc.rar file.
$rar D Abc.rar file1

Description: This command deletes the file1 file in the Abc.rar file, which is also valid for the directory.

The above is commonly used compression and decompression command,< option > part of the use no longer introduced, please try it yourself.

Download Address: http://www.rarsoft.com/download.htm
Whichever is the latest.


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.