加密一些机密的文件
使用zip加密
加密过程
# zip -re packageTest.zip packageTest
# 或者写为明文密码 zip -rP yourpassword packageTest.zip packageTest
Enter password:
Verify password:
adding: packageTest/ (stored 0%)
adding: packageTest/a.txt (stored 0%)
adding: packageTest/b.txt (stored 0%)
解密过程
# unzip packageTest.zip
Archive: packageTest.zip
creating: packageTest/
[packageTest.zip] packageTest/a.txt password:
extracting: packageTest/a.txt
extracting: packageTest/b.txt
使用tar加密
使用网上的教程可以加密,但是换台机器解密都是失败的情况,有遇到的朋友可以一起讨论下~~~
标签:加密,tar,zip,压缩文件,stored,packageTest,txt From: https://www.cnblogs.com/jasmine456/p/18177526