linux tar aes 打包加密

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
  
tar -cvf - foo | openssl enc -e -aes256 -k password -out foo.tar
  
openssl enc -d -aes256 -in foo.tar -k password | tar xv
  
openssl enc -d -aes256 -in foo.tar -k password | tar xv -C .

#原文件 foo
  
#密码 password
  
#目标文件 foo.tar