SCP使用遇到的问题, 麻烦帮忙看看.
我现在要将一个XML的文件从Windows下的PC 传送 到Sun Solaris 的服务器, 使用SCP(基于openSSH)命令传送的. 文件是传送到服务器上了,但是文件的每一行的末尾都有一个^M 的标示.现在我想在传送后没有每行的结尾^M的标识. 应该怎么样做呢? 谢谢先. 只能用命令模式的SCP来做. 其他的工具不让用呢...
作者: nhxingliang 发布时间: 2011-05-30
回复 nhxingliang
scp和copy命令一样,永远用binary模式,你无法使用scp的ascii模式来传送文件。要去掉 ^M,你只能使用tr或者dos2unix等命令了!!
The 'scp' command applies the same "rules" as the local the 'cp' command. The copy will always be in binary.
scp和copy命令一样,永远用binary模式,你无法使用scp的ascii模式来传送文件。要去掉 ^M,你只能使用tr或者dos2unix等命令了!!
The 'scp' command applies the same "rules" as the local the 'cp' command. The copy will always be in binary.
作者: wanglp2000 发布时间: 2011-05-30