压缩与解压¶
tar 加密压缩解压¶
加密压缩
tar zcvf - file | openssl des3 -salt -k secretpassword -out /path/to/file.tar.gz
# 使用dd
tar zcvf - file | openssl des3 -salt -k secretpassword | dd of=/path/to/file.tar.gz
解密解压
openssl des3 -d -k secretpassword -salt -in /path/to/file.tar.gz | tar xf -
# 使用dd
dd if=/path/to/file.tar.gz |openssl des3 -d -k secretpassword|tar xf -
不解压查看tar包内容¶
file.tar.gz
gzip -dc file.tar.gz | tar tvf -
file.tar.bz2
bzip2 -dc file.tar.bz2 |tar tvf -
file.tar
tar tvf file.tar