LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-10-2004, 05:43 AM   #1
LinuxRam
Member
 
Registered: Jul 2004
Distribution: Red Hat 9, Mandrake 9.2
Posts: 211

Rep: Reputation: 30
SAMBA share txt file editing questions


I added some text in a samba share file through windows computer.

FILE:-
my name is yoyo




dsf




add data from widows

but when i try to look at file that ,through linux computer it show me data like this a carrot symbol and capital M in between the data.

my name is yoyo
^M
^M
^M
^M
dsf
^M
^M
^M
^M
add data from widows


why the format of data has been changed , why this symbol and M comes within the lines


any idea ??
 
Old 09-10-2004, 05:52 AM   #2
RoofRabbit
Member
 
Registered: Mar 2004
Location: Lenoir, NC USA
Distribution: Mandrake 10.2
Posts: 129

Rep: Reputation: 15
I often read/write/create text files thru Samba from a windows pc and have no problems at all. You didn't mention what program you are using for your text editor, but you should make sure it saves as a text file format and not the often default MS Word format.
 
Old 09-10-2004, 05:57 AM   #3
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,235
Blog Entries: 1

Rep: Reputation: 2087Reputation: 2087Reputation: 2087Reputation: 2087Reputation: 2087Reputation: 2087Reputation: 2087Reputation: 2087Reputation: 2087Reputation: 2087Reputation: 2087
^M is the result of the different way Windoze and Unix represent CR-LF in an ascii file. There is a utility named dos2unix with elliminates this character.
 
Old 09-10-2004, 06:04 AM   #4
LinuxRam
Member
 
Registered: Jul 2004
Distribution: Red Hat 9, Mandrake 9.2
Posts: 211

Original Poster
Rep: Reputation: 30
Quote:
You didn't mention what program you are using for your text editor, but you should make sure it saves as a text file format and not the often default MS Word format.
in windows i am using notepad ,
and in linux i am using vi editor.

Quote:
^M is the result of the different way Windoze and Unix represent CR-LF in an ascii file. There is a utility named dos2unix with elliminates this character.
could u plz tell me form where can i get and how can use it remove the problem.
 
Old 09-10-2004, 06:20 AM   #5
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,235
Blog Entries: 1

Rep: Reputation: 2087Reputation: 2087Reputation: 2087Reputation: 2087Reputation: 2087Reputation: 2087Reputation: 2087Reputation: 2087Reputation: 2087Reputation: 2087Reputation: 2087
Since I use it on Solaris I don't know where you can find it, perhaps your distro has it. Anyway searching at google gave me this site: http://www.iconv.com/dos2unix.htm which does an online transformation of your files
 
Old 09-10-2004, 06:34 AM   #6
LinuxRam
Member
 
Registered: Jul 2004
Distribution: Red Hat 9, Mandrake 9.2
Posts: 211

Original Poster
Rep: Reputation: 30
bathory
thanks it works well,

but every time when ever changes are made to file i have to use this utility to convert it, this will take to much time.


any other idea which directly converts it while the modification where made through either window or linux computer.
 
Old 09-10-2004, 06:40 AM   #7
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,235
Blog Entries: 1

Rep: Reputation: 2087Reputation: 2087Reputation: 2087Reputation: 2087Reputation: 2087Reputation: 2087Reputation: 2087Reputation: 2087Reputation: 2087Reputation: 2087Reputation: 2087
Try other editors in Linux, like pico or joe. Another solution would be to edit the file in Windoze and copy it to the Linux share.
 
Old 09-10-2004, 07:06 AM   #8
LinuxRam
Member
 
Registered: Jul 2004
Distribution: Red Hat 9, Mandrake 9.2
Posts: 211

Original Poster
Rep: Reputation: 30
thanks "kwrite" works well for this issue for accessing it through linux,

but after saving some more lines from linux computer using kwrite, and then looking at windows computer then file comes in this format with some character in between the lines that i am not able to paste here. (some square black boxes)


my name is yoyo dsf add data from widows another data added from windows kljlkjlk;jl;kjl;jlklkjlkjkljkl; yoyo again yoyo


whereas original file format is this

my name is yoyo



dsf





add data from widows

kljlkjlk;jl;kjl;jlklkjlkjkljkl;

yoyo


again yoyo
 
Old 09-10-2004, 07:16 AM   #9
DertyolBA$HTARD
Member
 
Registered: Sep 2004
Location: USA
Distribution: Slackware 10
Posts: 86

Rep: Reputation: 15
Try using vi on both systems:
http://www.winvi.de/en/
 
Old 09-10-2004, 07:24 AM   #10
LinuxRam
Member
 
Registered: Jul 2004
Distribution: Red Hat 9, Mandrake 9.2
Posts: 211

Original Poster
Rep: Reputation: 30
i will try that,

don't u people face this problem.

And when i try to open linux share file in MS office word in windows computer , the format is correct but it doesn't allow me to save any changes whereas i can save changes through notepad.

why ms office word is not allowing me to save the changes.
 
Old 09-10-2004, 07:46 AM   #11
DertyolBA$HTARD
Member
 
Registered: Sep 2004
Location: USA
Distribution: Slackware 10
Posts: 86

Rep: Reputation: 15
The file permissions are probably set wrong.

Do a long directory listing on the file in question:

ls -lh <filename>

And let me know all the info that was provided.
 
Old 09-10-2004, 07:50 AM   #12
LinuxRam
Member
 
Registered: Jul 2004
Distribution: Red Hat 9, Mandrake 9.2
Posts: 211

Original Poster
Rep: Reputation: 30
#ls -lh testsamba

total 4.0K
-rwxrwxrwx 1 root root 158 Sep 10 18:13 testsamba*


when i try to save changes in testsamba file through word it gives me message box

"testsamba may contain features that are not compatible with Plain Text format. Do you want to save the document in this format ?"


i clicked yes

and then another message,

"Word cannot save or create this file. Make sure that the disk you want to save the file on is not full, write-protected,or damaged"
(\\MANDRAKE\sharemandrake\testsamba)

when i clicked ok it gives me save as dialog box when i click save button it gives me same as above

"Word cannot save or create this file. Make sure that the disk you want to save the file on is not full, write-protected,or damaged"
(\\MANDRAKE\sharemandrake\testsamba)



Last edited by LinuxRam; 09-10-2004 at 07:59 AM.
 
Old 09-10-2004, 07:56 AM   #13
DertyolBA$HTARD
Member
 
Registered: Sep 2004
Location: USA
Distribution: Slackware 10
Posts: 86

Rep: Reputation: 15
Well since I did not notice that notepad will save it the permissions obviously are not the trouble.

Is there any error message from MS Word?
 
Old 09-10-2004, 08:00 AM   #14
LinuxRam
Member
 
Registered: Jul 2004
Distribution: Red Hat 9, Mandrake 9.2
Posts: 211

Original Poster
Rep: Reputation: 30
plz read the changes to above message.
 
Old 09-10-2004, 08:37 AM   #15
LinuxRam
Member
 
Registered: Jul 2004
Distribution: Red Hat 9, Mandrake 9.2
Posts: 211

Original Poster
Rep: Reputation: 30
thanks DertyolBA$HTARD,


i had tried winvi that is working fine
and
now i had solved the problem for notepad and saving file through ms word also .

thanks a lot.....
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Samba OS X to Linux Samba file share error ttoomey Linux - Software 1 08-16-2005 10:12 AM
possible to see a Linux SAMBA File share... Russ3482 Linux - Software 1 08-11-2004 02:17 PM
samba as a file server/share mnadeemrao Linux - Software 0 10-30-2003 05:21 AM
Samba start up questions...Setting up share files and smb.conf file Xeroku Linux - Newbie 1 04-17-2003 10:10 PM
Changing file permissions on a SAMBA file share apenney Linux - Software 0 02-11-2002 04:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:26 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration