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