Plain text file transfer problem

William R. Knox wknox at mitre.org
Wed Nov 22 12:53:44 GMT 2000


Mark,
It is NOT samba that is doing this - samba does not change the file as
it is transferred (which ftp in ascii mode does), which is at the root
of your problem (perhaps a poor way to state this, really, as this is
desirable behavior). Windows, Macs, and Unix all have different ideas of
how the end of a line should be indicated in a text file. The carriage
returns you see are the result of this inconsistency. The program
dos2unix (a standard part of the install on Solaris and I believe Linux
as well) can be run to remove them ("dos2unix filename filename" will
convert the file to unix format and rewrite it back to the same
filename), or you can use a simple sed script as well.

Good luck.

-- 
			Bill Knox
			Senior Operating Systems Programmer/Analyst
			The MITRE Corporation

Mark Shaw wrote:
> 
> Hi all,
> 
> I have a problem with Samba's formatting of plain text files transferred from my
> NT 4 machine.  Linux inserts a ^M (carriage return) into every file at the end
> of every line.  Is there a way to configure Samba so it doesn't do this?  I'd
> hate to FTP to my Samba share; it kind of defeats the purpose.  If anyone has
> any ideas I would be most appreciative.
> 
> Thanks in advance
> 
> Mark Shaw




More information about the samba mailing list