SFTP本身不直接提供解压功能,需结合其他工具操作,具体方法如下:
使用 FileZilla、WinSCP 等客户端:
.zip
/.tar.gz
)。sftp username@hostname
get remote_file.zip ./local_path/
exit
unzip ./local_path/remote_file.zip -d ./destination/
tar -xzvf ./local_path/remote_file.tar.gz -C ./destination/
Expand-Archive -Path "C:\local_path\remote_file.zip" -DestinationPath "C:\destination\"