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.