Common Linux compression and decompression commands

Source: Internet
Author: User
1. Tar

Basic usage:

1. Package file: tar-CVF ~ /Test.tar ~ /Test

2. Package and compress the file: tar-zcvf ~ /Test.tar.gz ~ /Test

2. Unpack the file: switch to the directory to which you want to unpack the package, and then run tar-xvf ~ /Test.tar

Parameters:

 

-C, -- create creates a new archive -X, -- Extract, -- get to Extract files from the archive -T, -- list: List archived content -A, -- catenate, -- concatenate: append the tar file to the archive. -F, -- file = archive use an archive file or an archive Device -V, -- verbose detailed list of processed files -Z, -- gzip, -- gunzip, -- ungzip filter and archive through Gzip 2.zip and unzip

 

1. Compression:

Zip-r filename.zip file1 file2 file3/usr/work/School 

-R processes all subdirectories and files in the specified directory together.

2. decompress:

Decompress test.zip to the user directory: unzip ~ /Test.zip-D ~ /

Parameters:

-V displays detailed information when executing the command.
-O does not need to ask the user first. After unzip is executed, it overwrites the original file.
-N do not overwrite the original file during decompression.
-No information is displayed when Q is executed.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

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.