Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with Windows Lineend Codes

Status
Not open for further replies.

kjedwards

Programmer
Feb 14, 2002
12
GB
Hi I have a Linux RedHat box connected to a win2k box. I have Samba set up and it looks good - I can see the required files on Linux from Windows - great

However I do have a problem....

When I drag/Drop files from windows to a folder on the Linux box they copy ok BUT when I look at the copied files they contain some control characters (shown as a little box when viewed in gedit)

I understand these are ^M which are the Windows codes for Line Endings. This may seem ok but it is causing trouble big time - anything I copy over which is say a cgi script won't run because the first line contains these characters.

What I would like to know is if there a config option in Samba to auto detect the type of file and write it appropriately ie text files as ASCII and everything else as Binary, just like you can using FTP programs like Cute FTP?

Thanks

Kevin
 
thats just windows, samba does autodetect file types fine.

you will have to use the command dos2unix to change your files and scripts to remove the ^M's ... Windows uses these, Unix doesn't, and it's just a fact of life that they are there ... :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top