Method one: Using the tar command to encrypt and decompress files
Compression:
[HTML] View plain copy
Tar-zcf-filename |openssl des3-salt-k Password | DD Of=filename.des3
This command compresses the filename file to generate FILENAME.DES3 encrypted compressed file, password encrypted password
Extract:
[HTML] View plain copy
DD If=filename.des3 |openssl des3-d-k password | Tar zxf-
Note that the "-" at the very back of the command will release all files,-K password can not, and will be prompted to enter the password when extracting
Method Two: Use the zip command to encrypt and decompress the file
Compression:
[HTML] View plain copy
Zip-re filename.zip filename Enter 2 times password
[HTML] View plain copy
ZIP-RP passwork filename.zip filename passwork is the password to be entered
Extract:
[HTML] View plain copy
Unzip Filename.zip Follow the prompts to enter the password
[HTML] View plain copy
Unzip-p passwork Filename.zip Passwork is to extract the password, this will not be prompted to enter the password operation
A method of encrypting and decompressing files under Linux