Unix .TXT vs DOS .TXT files

Chris Watt cnww at hfx.andara.com
Wed Dec 29 04:49:36 GMT 1999

At 12:56 PM 12/29/99 +1100, you wrote:

>Can Samba convert the text files based on the client?

No. This would be a very dangerous thing for Samba to try to do, especially
when you consider the fact that a Linux newline is one character, and a DOS
newline is a CR followed by an LF, so it would even be changing the size of
the file from one client to another. . . Nasty business. In my case since I
use a Windows workstation (I like the GUI, and I like being able to go play
games from time to time) to write code for Linux and Solaris, I just
installed a Windows text editor that could handle Linux/UNIX style line
endings (in my case GWD Text Editor). If you absolutely cannot buy new
software, just put the updated version of edit.exe on your Windows boxes
(it comes with win9x, and probably also with NT4) and use that instead of
Notepad. It doesn't have much in the way of features, but it can deal with
line endings properly.

If (for some reason) you absolutely MUST have the files translated to you
can read them in notepad, get a copy of the dos2unix and unix2dos text
conversion utils and then run them with the preexec and postexec commands
in your share definition. It will be a little silly, and somewhat risky if
it's a multi-user accessable share, but it would work.

Who is this General Failure, and why is he reading my hard disk?

More information about the samba mailing list