Zip encryption and compression in Linux

Source: Internet
Author: User
The zip [parameter] & lt; zip package & gt; & lt; source file & gt; uses the zip format...

 

Zip encryption and compression in Linux

 

Zip-q-r-P password zipfile.zip sourcefiles.txt password is the encrypted password

Zipfile.zip is the generated compressed file.

Sourcefiles.txt is a compressed file.

 

Zip [Parameters] <压缩包> <源文件>

 

Package files in zip format

-R recursion: All files and subdirectories in the specified directory are processed together.

-S contains System and hidden files

-Y directly saves the symbolic connection, not the file to which the connection points

-X does not save additional file attributes

-M: After compressing the file and adding it to the compressed file, delete the source file.

- <压缩级别> 1 ~ 9. the larger the number, the higher the compression ratio.

-F try to repair damaged compressed files

-T check whether each file in the backup file is correct

-Q: The command execution process is not displayed.

-G: compress the file and append it to the existing compressed file, instead of creating a new compressed file.

-U: update files in the compressed package

-F: update files in the compressed package. If the file that meets the criteria is not included in the package, compress the file and add

-$ Save the volume label of the disk where the first compressed file is located

-J: only save the file name and content

-D. do not create a directory name in the compressed file.

-I <表达式> Only files that meet the criteria are compressed.

-X <表达式> Exclude eligible files

-N <文件名后缀> Exclude objects with the specified filename suffix

-B <缓存路径> Temporary file directory

-D <表达式> Delete a specified file from a compressed file

-T <日期时间> Set the date of the compressed file to the specified date.

-O the file with the latest change time in the compressed file is used as the standard, and the change time of the compressed file is set to the same as that of the file.

-A: adjust the executable automatic decompression file

-C add comments to each compressed file

-Add comments to the compressed file using z.

-K uses a file name in MS-DOS-compatible format.

-L replace the LF character with the LF + CR character when compressing the file.

-Replace the LF + CR character with the LF character when compressing the file.

 

Example:

 

Pack all the files and files in the/home/B linux/html/directory into the html.zip file under the current directory.

 

Zip-q-r html.zip/home/B linux/html

 

Unzip-q-n-P password zipfile.zip-d/home/admpub/

 

Unzip [Parameters] <压缩文件> [Files to be released in the compressed package]

 

Decompress the zip package

-P <密码> Zip package password

-D <路径> Extract path

-N: the original file is not overwritten during decompression.

-F overwrite the original file

-O overwrite the original file without asking

-U overwrites the original file and decompress other files in the compressed file to the directory.

-L display the files contained in the compressed file

-T check whether the compressed file is correct

-Z: Show compressed package comments

-Z unzip-Z is equivalent to executing the zipinfo command.

-J. The original directory path of the compressed file is not processed.

-C: The file name in the compressed file is case sensitive.

-L change all file names in the compressed file to lowercase letters.

-S converts spaces in the file name into underscores.

-X: The original UID/GID of the file is retained during decompression.

-No information is displayed during q execution.

-V: Detailed information is displayed when execution is performed.

-C: Display the extracted results on the screen and convert the characters properly.

The-p parameter is similar to the-c parameter. the decompressed result is displayed on the screen, but no conversion is performed.

-A: perform necessary character conversion on text files

-B. do not convert characters in text files.

-X <表达式> Exclude specified files in the compressed package during processing

-M sends the output result to the more Program for processing.

 


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.