Compression and decompression of files in Linux __linux

Source: Internet
Author: User

(1) Packaging and compressing files
Packaged files in Linux generally end with. Tar, and compressed commands are usually terminated with. Gz.
In general, packaging and compression are carried out together, packaged and compressed files after the suffix name generally. tar.gz.
Command: TAR-ZCVF Package compressed file name to package compressed files
Where: Z: Invoke the gzip compression command for compression
C: Packaging files
V: Show Run process
F: Specify file name
Example: Package and compress all files under/test compressed package with the specified name of xxx.tar.gz
TAR-ZCVF xxx.tar.gz aaa.txt bbb.txt ccc.txt
Or: TAR-ZCVF xxx.tar.gz/test/*

(2) decompression compression package
Command: Tar [-ZXVF] Compressed file
Where: x: On behalf of decompression
you can not write Z, write z represents the specified compression method, you can automatically identify
Example: Extract the xxx.tar.gz under/test to the current directory
TAR-ZXVF xxx.tar.gz

Example: Extract the xxx.tar.gz under/test into the root directory/usr
TAR-XVF xxx.tar.gz-c/usr--c represents the location of the specified decompression

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.