Solved

Transfer ASCII file in Samba server problem.

Posted on 1998-06-02
3
525 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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

In this tutorial I will explain how to make squid prevent malwares in five easy steps: Squid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more. It reduces bandwidth and improves response times by caching and reusing frequently-…
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 several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

863 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now