LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-17-2005, 03:34 PM   #1
KenMadsen
LQ Newbie
 
Registered: Jun 2005
Distribution: RHEL ES 3.0
Posts: 2

Rep: Reputation: 0
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)
 
Old 06-17-2005, 04:34 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 26,864

Rep: Reputation: 6357Reputation: 6357Reputation: 6357Reputation: 6357Reputation: 6357Reputation: 6357Reputation: 6357Reputation: 6357Reputation: 6357Reputation: 6357Reputation: 6357
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.
 
Old 06-20-2005, 09:51 AM   #3
KenMadsen
LQ Newbie
 
Registered: Jun 2005
Distribution: RHEL ES 3.0
Posts: 2

Original Poster
Rep: Reputation: 0
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Extended ASCII characters in UNIX MatSzor Programming 5 05-15-2004 09:57 PM
Resuming FTP transfers on command-line Mankind75 Linux - Software 7 04-23-2004 10:08 AM
UNIX (Linux, BSD, etc) Programming :: UNIX kuphryn Programming 8 04-04-2004 11:50 PM
Multiple File Transfers FTP Client 4 Linx aaronluke Linux - Software 2 10-30-2002 09:19 PM
slow ftp transfers using in.ftpd mrdiet Linux - Networking 2 06-10-2001 05:53 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:16 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration