When I copy a file prueba.sql of Windows to UNIX via samba, when opening it in UNIX at the end of each line it is with a ^M, that parameter is necessary to activate or to use so that it is transferred well? Thanks. -------------- next part -------------- HTML attachment scrubbed and removed
On Thursday 25 October 2001 18:04, Edwin Villlalta wrote:> When I copy a file prueba.sql of Windows to UNIX via samba, when opening it > in UNIX at the end of each line it is with a ^M, that parameter is > necessary to activate or to use so that it is transferred well?Yes and no. Unix generally uses a newline character (^J) to indicate the end of a line, while Windows (and many other systems) use both a linefeed (^J) and a carriage return (^M) When the file is viewed in Unix, the carriage returns (^M) are unneeded, so many Unix text editors will display them as ^Ms. Without the ^Ms, some windows editors will not understand the file correctly and will display it as one big long line. Most advanced text editors will display the file properly whether it has the ^Ms or nots, and some will even give you the option of keeping them or removing them when the file is saved. -- Bill Moran Potential Technology technical services http://www.potentialtech.com
Well, let's see if I can beat the hundreds of other people to answer this :) You don't have to do anyhting to transfer the file well. It tranfered perfectly as is. Unfortunately, Windows Text file format is a little different from Unix Text File. Each line in a Unix text file ends in LF Each line in Windows text file ends in LF/CR The extra CR is displayed as a ^M character. If your going to be using the file in Unix, (and only unix) there are various utilities that will convert dos text files and back again.. If, however, the file will remain on a Samba share for other Windows boxes to use, it should be left as is. On Thu, 25 Oct 2001, Edwin Villlalta wrote:> > When I copy a file prueba.sql of Windows to UNIX via samba, when opening it in UNIX at the end of each line it is with a ^M, that parameter is necessary to activate or to use so that it is transferred well? > > Thanks. >
> > When I copy a file prueba.sql of Windows to UNIX via samba, when opening it in UNIX at the end of each line it is with a ^M, that parameter is necessary to activate or to use so that it is transferred well? > > Thanks. >Is prueba.sql a ASCII-file? I guess so. Windows and Unix have different line endings in those files. Not a samba problem. Use an Editor that can handle both types. Check this list. Some weeks ago there was a long discussion about it. Christian _(_)_ wWWWw _ @@@@ (_)@(_) vVVVv _ @@@@ (___) _(_)_ @@()@@ wWWWw (_)\ (___) _(_)_ @@()@@ Y (_)@(_) @@@@ (___) `|/ Y (_)@(_) @@@@ \|/ (_)\ / Y \| \|/ /(_) \| |/ | \ | \ |/ | / \ | / \|/ |/ \| \|/ jgs|// \\|/// \\\|//\\\|/// \|/// \\\|// \\|// \\\|// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^