Zip encryption and compression in Linux

Source: Internet
Author: User

 

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] <compressed package> <Source File>

 

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.

-<Compression level> 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 <expression> only files that meet the conditions are compressed when the directory is compressed.

-X <expression> exclude eligible files

-N <file name suffix> exclude files with the specified file name suffix

-B <cache path> specifies the temporary file directory

-D <expression> Delete the specified file from the compressed file

-T <date and time> sets 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 [parameter] <compressed file> [files to be released in the compressed package]

 

Decompress the zip package

-P <password> zip package Password

-D <path> specifies the decompression 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 <expression> 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.