Solved

Transfer ASCII file in Samba server problem.

Posted on 1998-06-02
3
526 Views
Last Modified: 2013-12-15
I want to transfer some file from WinNT to a Samba server by drag and drop.  However when I view the file from the Samba server by using vi, it shows up ^M at the end of the sentence.  Can anybody tell me if there are any resources or what I should do in the Samba configuration in order to get rid of this ^M problem.
0
Comment
Question by:andrewma
3 Comments
 
LVL 4

Expert Comment

by:feenix
ID: 1627451
In the MS-world the lines have both CR and LF at the end. In UNIX there is only LF character so vi shows the CR as ^M. You can use either dos2unix and unix2dos utilities to convert CR+LF<->LF or use 'tr -d \r < file.txt' to remove the ^M characters.

0
 

Author Comment

by:andrewma
ID: 1627452
Maybe I did not make myself clear on the question.  I want to see if there is anyway to make it in the Samba configuration file instead of converting the explicitly in the UNIX prompt.
0
 
LVL 51

Accepted Solution

by:
ahoffmann earned 100 total points
ID: 1627453
No, samba can't do it.
Samba does not know anything about file-contens, it just implements the SMB protocol, that's all.

You can try to program something using samba's preexec and postexec entries.
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

778 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question