Linux host zip decompression and Packaging command

Source: Internet
Author: User
Tags ftp file zip

The basic usage of the Linux zip command is:
Zip [parameters] [packaged filename] [packaged directory path]

List of Linux zip command parameters:

-A to turn files into ASCII mode
-F attempt to repair corrupted compressed files
-H Display Help interface
-M after compressing the file, delete the source file
-N-specific strings do not compress files with a specific character end string
-O Sets the latest change time for all files in the compressed file to the time of compression
-Q Quiet mode, which does not show the execution of instructions during compression
-R handles all subdirectories and files in the specified directory
-S contains system files and hidden files (s is uppercase)
-T date sets the last modification date of the compressed file to the specified date, with the date format mmddyyyy

Linux Host Zip Package example:

/home/blinux/html/all files and folders in this directory into the current directory Html.zip

Zip–q–r html.zip/home/blinux/html

The command operation above is to compress the files and folders of an absolute address. The following is a list of compressed relative paths
For example, currently in the Bliux directory, do the following to achieve the same effect.

Zip–q–r Html.zip HTML

For example, now in my HTML directory, the ZIP compression command I'm working on is

Zip–q–r Html.zip *

The basic syntax for the Unzip command is: Unzip [parameters] Zip file

Linux Host Zip decompression simple example:

Unzip the Test.zip file in this directory: Unzip Test.zip

Parameter list:

-l list What the compressed file contains
-V displays detailed execution procedures

is not very simple, directly extract the compressed package to the current file, and then we can use the command or FTP file path adjustment. In general, Zip/unzip is used for the packaging and uploading of website files, as well as decompression and backup, which can improve our efficiency.

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.