Use the 7z compression and decompression tool-command line

Source: Internet
Author: User


Compression: "A" belongs to the 7z compression command; "-R" belongs to the 7z parameter, indicating Recursion

7z A compressfilename Source
7z A compressfilename source-R

Extract
: "X" is a 7z decompression command; "-o" (letter O) is a 7z parameter, indicating that the output directory is followed by the directory path, absolute or relative path (starting from the current directory)
7z x compressfilename
7z x compressfilename-o
Note: Although "e" is also a 7z decompression command, unlike "X", it seems that all files are decompressed to the current directory or specified directory, the specific rules are unclear, and the extracted files are messy.We strongly recommend that you use the X command.

Volume compression:It is basically the same as the command or parameter used for compression, except that there is an extra "-V" parameter, followed by the size of each volume. The unit can be B, K, M, G

For other help information, see the following 7z:
Usage: 7z <command> [<switches>...] <archive_name> [<file_names>...]
[<@ Listfiles...>]

<Commands>
A: add files to archive
B: Benchmark
D: delete files from archive
E: Extract files from archive (without using directory names)
L: List contents of Archive
T: Test integrity of Archive
U: update files to archive
X: Extract files with full paths
<Switches>
-Ai [R [-| 0] {@ listfile |! Wildcard}: include archives
-Ax [R [-| 0] {@ listfile |! Wildcard}: exclude Archives
-BD: Disable percentage indicator
-I [R [-| 0] {@ listfile |! Wildcard}: Include filenames
-M {parameters}: Set Compression Method
-O {directory}: Set output directory
-P {password}: Set Password
-R [-| 0]: recurse subdirectories
-SCS {UTF-8 | win | dos}: Set charset for List Files
-SFX [{name}]: Create SFX Archive
-Si [{name}]: read data from stdin
-Slt: Show technical information for L (list) command
-So: Write Data to stdout
-SSC [-]: Set sensitive case Mode
-T {type}: Set Type of Archive
-U [-] [p #] [Q #] [R #] [x #] [y #] [Z #] [! Newarchivename]: update options
-V {size} [B | K | M | G]: Create volumes
-W [{path}]: assign work directory. Empty path means a temporary directory
-X [R [-| 0] {@ listfile |! Wildcard}: exclude filenames
-Y: Assume yes on all queries

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.