win and unix and EOL

Andrew Bartlett abartlet at pcug.org.au
Sat May 5 23:41:38 GMT 2001


Robert McGraw wrote:
> 
> I am using samba on a Sun e450 running solaris 7 and Samba 2.1.
> 
> I have some users that want to save some files on the samba directory but
> would like to have the LF ^M removed. The files with the ^M is causes some
> problems on the UNIX side.
> 
> Is there a way that I can set a directory that will remove the ^M from a
> text file when it is moved into the directory?
> 
> I do not see anything in the smb.conf file and I would thing not, but just
> in case I am asking the question.
> 
> Thanks
> 
> Robert

If I understand correctly, the standard response is 'can not, will not'.

Samba specifically does not have this ability because: 
1.  It is impossible to reliably tell what is a binary file (don't
touch) and what is a text file (munge away the CRs).  
2.  Not getting it exactly right can and will lead to data corruption.
3.  There are much better ways to do it.  Tools like dos2unix, unix2dos,
simple tr scripts, the list is endless.

Andrew Bartlett

-- 
Andrew Bartlett
abartlet at pcug.org.au




More information about the samba mailing list