Solved

Transfer ASCII file in Samba server problem.

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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
AWS ELB 5 109
CENTOS DHCP Server / PXE/TFTP 14 201
Upgrade BIOS / EUFI at Scale 4 69
Recover Lacie Edmini data. 11 63
This is the error message I got (CODE) Error caused by incompatible libmp3lame 3.98-2 with ffmpeg I've googled this error message and found out sometimes it attaches this note "can be treated with downgrade libmp3lame to version 3.97 or 3.98" …
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
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…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

679 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