Methods for extracting. tar.gz,. gz,. zip files via ssh

Source: Internet
Author: User

Generally under Linux, there are several commonly used compression formats:. tar.gz,. GZ,. zip

Unzip the. tar.gz file command: TAR-ZXVF xxx.tar.gz

Unzip the. gz file command: Gunzip xxx.gz

Unzip the. zip file command: Unzip Xxx.zip

Compress a folder with tar: TAR-ZCVF public_html.tar.gz public_html

Zip compression usage under Linux

1.zip
Zip-r xxx.zip./*
All files and folders under the current directory are compressed into xxx.zip files, and-R indicates that all files in the subdirectory are compressed recursively.

2.unzip
Unzip-o-d/home/admin Xxx.zip
Unzip the Xxx.zip file to/home/admin/
-O: Overwrite files without prompting
-d:-d/home/admin indicates that the file is extracted to the/home/admin directory.

3. Other
zip-d Xxx.zip Smart.txt
To delete a smart.txt file in a compressed file
Zip-m Xxx.zip./phpinfo.txt
Add the Phpinfo.txt file to the Xxx.zip in the compressed file.

Methods for extracting. tar.gz,. gz,. zip files via ssh

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.