LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Linux/UNIX differences with vi and ftp ascii transfers (https://www.linuxquestions.org/questions/linux-newbie-8/linux-unix-differences-with-vi-and-ftp-ascii-transfers-334680/)

KenMadsen 06-17-2005 03:34 PM

Linux/UNIX differences with vi and ftp ascii transfers
 
I have experience using Solaris 2.8 and HP-UX 11.0 (more end user than anything)

Now that we have started using RH Linux, there is a difference that I cannot resolve.

On the other unix machines, we would ftp files in ASCII mode from Windows machines and they had the correct eol characters once on the unix box.

And, if you blew it (or suspected someone else did), you could open the file in vi and see all the ^M characters.

Now, on Linux, we have had trouble with files ftp'd from windows machines and vi doesn't show the ^M characters.

Is this just the way it is, or is there a way to configure ftp to work differently? Is there some other program that can show the ^M characters?

(we have used dos2unix to repair files, but prefer to transfer them in a manner that precludes the need to do so)

michaelk 06-17-2005 04:34 PM

vim can automatically detect file formats why you do not see the ^m. If you look at the bottom message when the file is opened you will that it is a DOS file. The ASCII transfer method is supposed to translate the EOL characters. It actually been awhile since I've used FTP ASCII transfer...

Is the FTP client set to ASCII transfer mode? I do not know of any specific server FTP ASCII configuraton conversion mode.

KenMadsen 06-20-2005 09:51 AM

I have actually ftp'd the same file in binary and ascii modes and I still have the same effect in vi (no ^M displayed and [dos] in the status line)

This is what was surprising to me - I was completely used to ftp converting EOLs properly based on my past experience with Solaris and HP. Now it doesn't work at all on Linux.

I checked the services and tftp and vsftp are running. I believe the latter is what I'm connecting to with the Windows or Reflections FTP clients.

If anyone knows of a way of configuring this into working order, it would certainly help us out.


All times are GMT -5. The time now is 12:17 AM.