用windows系統的rar軟件壓縮的zip文檔,在linux環境下格式不支持,linux用unzip出現了錯誤“unsupported compression method”。
網上說用7z,然而我沒有管理員權限。
所以在windows下用了命令行里的tar命令打包成.tar.gz的格式,然后傳到linux服務器上解壓。
tar加密打包:
tar -zcvf - ./file | openssl des3 -salt -k pwd | dd of=file.des3
解壓縮:
openssl des3 -d -k pwd -salt -in file.tar.gz | tar xz -C /your_path
