SFTP 传输文件时 Ctrl-M 字符

发布于 2024-07-13 21:48:04 字数 235 浏览 6 评论 0原文

我正在使用 JSCAPE ftp 客户端将文件从 Windows 系统发送到 Unix SFTP 服务器。 但是,我遇到了以下问题: 将文本文件从 Windows 上传到 UNIX 时,传输的文本文件的每一行都包含 Control-M 字符。 我做了一些搜索,发现如果我使用“ASCII”传输模式,它应该可以解决问题。 但 Ctrl-M 仍然出现在文件上。

任何人都可以阐明这个问题吗?

提前致谢

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

絕版丫頭 2024-07-20 21:48:05

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

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

Some text editors have this functionality built in. For instance, Notepad++

Do you have cygwin? You can use the dos2unix utility.

橪书 2024-07-20 21:48:04

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

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

FTP supports switching between Binary and ASCII transfer mode and converting data on the fly but SFTP does not support that feature and it always transfers files unchanged (at least for the most popular version 3 of the protocol).

The utility dos2unix can be used to convert files from DOS to Unix.

梦里寻她 2024-07-20 21:48:04

这是 Windows 文件中显示在 UNIX 系统上的换行符。

在上传之前转换行结尾,或者找到可以为您完成此操作的不同 FTP 服务器包。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文