在使用FTP时,我们可以使用选项bi
在二进制模式下传输文件,但是我无法在SFTP中找到类似的选项。请在下面找到我的代码片段。
fileTransferToDEST()
{
echo "mput $4/$1 $3/" | sftp -b - $SRV_USER@$DEST_IP
}
fileTransferToDEST $filename $logpathwithfilename $destinationpath $sourcepath
returnvalue=$?
if [ "$returnvalue" != "0" ]; then
echo;echo "FTP : Failed while transfering"
exit 2
fi
请给我建议。提前谢谢。
发布于 2019-06-17 10:49:02
OpenSSH sftp
只支持二进制模式。所以这是隐含的。
还请参见如何在SFTP中传输二进制文件? (在堆栈溢出上)
https://unix.stackexchange.com/questions/525389
复制相似问题