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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
09-10-2004, 05:43 AM
|
#1
|
Member
Registered: Jul 2004
Distribution: Red Hat 9, Mandrake 9.2
Posts: 211
Rep:
|
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 ??
|
|
|
09-10-2004, 05:52 AM
|
#2
|
Member
Registered: Mar 2004
Location: Lenoir, NC USA
Distribution: Mandrake 10.2
Posts: 129
Rep:
|
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.
|
|
|
09-10-2004, 05:57 AM
|
#3
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,235
|
^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.
|
|
|
09-10-2004, 06:04 AM
|
#4
|
Member
Registered: Jul 2004
Distribution: Red Hat 9, Mandrake 9.2
Posts: 211
Original Poster
Rep:
|
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.
|
|
|
09-10-2004, 06:20 AM
|
#5
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,235
|
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
|
|
|
09-10-2004, 06:34 AM
|
#6
|
Member
Registered: Jul 2004
Distribution: Red Hat 9, Mandrake 9.2
Posts: 211
Original Poster
Rep:
|
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.
|
|
|
09-10-2004, 06:40 AM
|
#7
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,235
|
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.
|
|
|
09-10-2004, 07:06 AM
|
#8
|
Member
Registered: Jul 2004
Distribution: Red Hat 9, Mandrake 9.2
Posts: 211
Original Poster
Rep:
|
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
|
|
|
09-10-2004, 07:16 AM
|
#9
|
Member
Registered: Sep 2004
Location: USA
Distribution: Slackware 10
Posts: 86
Rep:
|
Try using vi on both systems:
http://www.winvi.de/en/
|
|
|
09-10-2004, 07:24 AM
|
#10
|
Member
Registered: Jul 2004
Distribution: Red Hat 9, Mandrake 9.2
Posts: 211
Original Poster
Rep:
|
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.
|
|
|
09-10-2004, 07:46 AM
|
#11
|
Member
Registered: Sep 2004
Location: USA
Distribution: Slackware 10
Posts: 86
Rep:
|
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.
|
|
|
09-10-2004, 07:50 AM
|
#12
|
Member
Registered: Jul 2004
Distribution: Red Hat 9, Mandrake 9.2
Posts: 211
Original Poster
Rep:
|
#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.
|
|
|
09-10-2004, 07:56 AM
|
#13
|
Member
Registered: Sep 2004
Location: USA
Distribution: Slackware 10
Posts: 86
Rep:
|
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?
|
|
|
09-10-2004, 08:00 AM
|
#14
|
Member
Registered: Jul 2004
Distribution: Red Hat 9, Mandrake 9.2
Posts: 211
Original Poster
Rep:
|
plz read the changes to above message.
|
|
|
09-10-2004, 08:37 AM
|
#15
|
Member
Registered: Jul 2004
Distribution: Red Hat 9, Mandrake 9.2
Posts: 211
Original Poster
Rep:
|
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.....
|
|
|
All times are GMT -5. The time now is 06:26 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|