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\"