使用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
请指教。提前致谢。
OpenSSHsftp
仅支持二进制模式。因此它是隐式的。
另请参阅如何在SFTP中传输二进制文件?(在堆栈溢出时)
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句