Linux file Compression decompression command

Source: Internet
Author: User

Gzip

Command name: gzip

Command English Original: GUN Zip

The command is in the same way: Bin/gzip

Execute Permissions: All Users

Syntax: gzip [ file ]

function Description: Compress Files

file format after compression: . GZ

Gunzip

Command name: Gunzip

Command English Original: GUN Unzip

The command is in the same way: Bin/gunzip

Execute Permissions: All Users

Syntax: gunzip [ compressed file ]

function Description: Unzip the . GZ zip file

Example: gunzip djh.gz

Tar

Command name: Tar

The command is in the same way: Bin/tar

Execute Permissions: All Users

syntax:tar options [-zcf][ compressed filename ] [ directory ]

-C Packaging

-V Show more information

-F Specify file name

-Z Package simultaneous compression

function Description: Package Directory

file format after compression: . tar.gz

Example: TAR-ZCF djh.tar.gz DJH

Package and compress the directory DJH as 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 djh.tar.gz

Zip

Command name: Zip

The command is in the same way: Usr/bin/zip

Execute Permissions: All Users

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

-C Compressed file

function Description: compress files or directories to keep the original files

file format after compression: . zip

Example: TAR-ZCF djh.tar.gz DJH

Package and compress the directory DJH as a . tar.gz file

Unzip

Command name: Unzip

The command is in the same way: Usr/bin/unzip

Execute Permissions: All Users

Syntax: Unzip [ compressed file ]

function Description: unzip the . zip file

Example: Unzip Djh.zip

Bzip2

command name:b Zip2

The command is in the same way: usr/bin/bzip2

Execute Permissions: All Users

syntax:b Zip2 Options [-k][ file ]

-K retain original file after generating compressed file

function Description: Compress Files

File format after compression:. bz2

Example: bzip2-k DJH

TAR-CJF djh.tar.bz2 DJH

Bunzip2

Command name: bunzip2

The command is in the same way: usr/bin/bunzip2

Execute Permissions: All Users

Syntax: Unzip Options [-k][ compressed file ]

-K retain original file after decompression

function Description: unzip . Shrinking

Example: bunzip2-k djh.bz2

TAR-XJF djh.tar.bz2


This article is from the "djh01" blog, make sure to keep this source http://djh01.blog.51cto.com/10177066/1689102

Linux file Compression decompression command

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.