4

I am sending files from a windows system to a Unix SFTP server using JSCAPE ftp client. However, I am experiencing the following issue: When uploading a text file from windows to UNiX, each line of text files transferred contains Control-M characters. I did some search and found out that If I use the "ASCII" transfer mode it should solve the issue. But the Ctrl-M is still appearing on the files.

Can anyone throw some light in this issue?

thanks in advance

4

3 回答 3

2

FTP支持在二进制和 ASCII 传输模式之间切换并即时转换数据,但SFTP不支持该功能,并且它始终传输文件不变(至少对于最流行的协议版本 3)。

实用程序dos2unix可用于将文件从 DOS 转换为 Unix。

于 2011-01-24T08:52:27.127 回答
0

That's the newline character from windows files showing up on UNIX system.

Convert the line endings prior to uploading or find a different FTP server package that can do it for you.

于 2009-02-27T17:49:57.087 回答
0

一些文本编辑器内置了此功能。例如,Notepad++

你有cygwin吗?您可以使用 dos2unix 实用程序。

于 2009-02-27T20:31:02.473 回答