linux-Common Commands (4) Compress decompression commands

Source: Internet
Author: User

Compression decompression Command: gzip

Command name: gzip

Command English original: GNU zip

Command location:/bin/gzip

Execute Permissions: All Users

Function Description: Compress file

Compressed file format: . GZ

Syntax: gzip [file]

----------------------------------------------------

Compression decompression command: Gunzip

Command name: gunzip

Command English original: GNU unzip

Command location:/bin/gunzip

Execute Permissions: All Users

Function Description: Unzip the . GZ zip file

Compressed file format:. gz

Syntax:gunzip [compressed file]

----------------------------------------------------

Compression decompression Command: Tar

Command name: Tar

Command location:/bin/tar

Execute Permissions: All Users

Function Description: Package directory

Compressed file format: . tar.gz

Syntax: tar options [-zcf] [file name after compression] [directory]

- C Packaging

-V Show More information

-F Specify File name

-Z Package simultaneous compression

Example: $ TAR-ZCF Japan.tar.gz Japan

Package and compress the directory Japan into a. tar.gz file

The TAR command decompression syntax:

- x Unpack the package

-V Show More information

-F Specify Unzip file

-Z Decompression

Example: $ TAR-ZXVF Janpan.tar.gz

----------------------------------------------------

Compression Decompression command: Zip

Command name: Zip

Command location:/usr/bin/zip

Execute Permissions: All Users

Function Description: Compress files or directories

Compressed file format: . zip

Syntax: Zip option [-r] [compressed filename] [file or directory]

-R Compression Directory

Example: $ zip somnus.zip somnus

Compress files

$ zip-r Somnus.zip Somnus

Compressed directory

----------------------------------------------------

Compression decompression Command: Unzip

Command name: Zip

Command location:/usr/bin/unzip

Execute Permissions: All Users

Function Description: Unzip the . zip file

Syntax: Unzip [compressed file]

Example: $ unzip Somnus.zip


linux-Common Commands (4) Compress decompression commands

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.