ZIP package and zip package
The basic usage of linux zip commands is:
Zip [parameter] [package file name] [Package directory path]
Linux zip command parameter list:
-A converts a file to ASCII mode.
-F try to repair damaged compressed files
-H: display the Help Page
-M: after compressing the file, delete the source file.
-N the specified string does not compress the file with the specified character string.
-O sets the latest change time of all files in the compressed file to the compression time.
-Q quiet mode. The command execution process is not displayed during compression.
-R processes all subdirectories and files in the specified directory together.
-S contains system files and implicit files (S is capital)
-T date: Set the last modification date of the compressed file to the specified date. The date format is mmddyyyy.
// Http://www.cnblogs.com/xiaobo-Linux/
Example:
Pack all the files and files in the/home/Blinux/html/directory into the html.zip file under the current directory.
1 |
zip –q –r html.zip /home/Blinux/html |
The preceding command compresses the files and folders of the absolute address.
For example, in the Bliux directory, you can perform the following operations to achieve the same effect.
1 |
zip –q –r html.zip html |
For example, the zip compression command in my html directory is
The basic syntax of the unzip command is: unzip [parameter] zip file
Simple Example:
Decompress the test.zip file in this directory: unzip test.zip
Parameter List:
-L list the content contained in the compressed file
-V: Detailed Execution Process