Getting ctl M

Andrew Bartlett abartlet at pcug.org.au
Sun Jan 14 23:55:39 GMT 2001


Dick Hill wrote:
> 
> New to the Samba world.  I am getting a control M at the end of line for each file I am transfering to the share from  98/NT machines.  Any special things I need to do so this will not happen??????????????

This is normal - while on Unix system new lines are signified by 'LF',
on DOS systems a 'CR+LF' is required.  This, depending on your editor,
means that the 'CR' gets shown as '^M' to indicate an otherwise
unprintable charater.  Other editors will notice these 'dos style' files
and automaticly use the dos new-line conventions.

In any case, there is a tool called dos2unix and unix2dos that can
handle the conversion for you.  As to why samba dosn't do this
automaticly - it is nearly impossible to correctly identify a text file
during file transfer, and users would find their binary files silantly
corupted by the process.

Hope this helps,

Andrew Bartlett

-- 
Andrew Bartlett
abartlet at pcug.org.au




More information about the samba mailing list