Linux tar加密压缩命令

转载 · ivansuntech · 2019-05-17 · 原文

加密压缩

tar -czvf - file | openssl des3 -salt -k password -out /path/file.tar.gz

解密解压

openssl des3 -d -k password -salt -in /path/file.tar.gz | tar xz -C /path

注意 -C 指定目录要实际存在

解压例子:

openssl des3 -d -k mima123 -salt -in Tools.tar.gz | tar xzf -