Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Transfer ASCII file in Samba server problem.

Posted on 1998-06-02
3
Medium Priority
?
549 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 200 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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
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 …
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month11 days, 1 hour left to enroll

885 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