UNIX Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsUNIX Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old August 2nd, 2006, 08:42 AM
asty asty is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 89 asty User rank is Private First Class (20 - 50 Reputation Level)asty User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 15 h 28 m 46 sec
Reputation Power: 4
Problem with file on FTPing it

Hi.
I sent a file to my Solaris Server SunOS 5.9 by FTP from my windows system. But on reaching there '^M' has been added at the end of every line. Why has this happenned and how to prevent it?
Thanks in advance.

Abhishek

Reply With Quote
  #2  
Old August 2nd, 2006, 09:51 AM
stdunbar stdunbar is offline
Contributing User
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: May 2004
Location: Superior, CO, USA
Posts: 1,709 stdunbar User rank is Major (30000 - 40000 Reputation Level)stdunbar User rank is Major (30000 - 40000 Reputation Level)stdunbar User rank is Major (30000 - 40000 Reputation Level)stdunbar User rank is Major (30000 - 40000 Reputation Level)stdunbar User rank is Major (30000 - 40000 Reputation Level)stdunbar User rank is Major (30000 - 40000 Reputation Level)stdunbar User rank is Major (30000 - 40000 Reputation Level)stdunbar User rank is Major (30000 - 40000 Reputation Level)stdunbar User rank is Major (30000 - 40000 Reputation Level)stdunbar User rank is Major (30000 - 40000 Reputation Level) 
Time spent in forums: 1 Month 2 Days 18 h 11 m
Reputation Power: 338
Send a message via ICQ to stdunbar Send a message via Yahoo to stdunbar
No, it had that before - they just didn't show in Windows because windows uses that as part of the new line string.

There are a variety of ways to fix this but under Solaris the easiest way is to use the dos2unix command. Do a "man" on that and you can see how to run it. It will get rid of the ^M's. However, realize that if you send the file back to Windows it may be counting on them to be there. In that case use the unix2dos command to convert the file back to DOS format.
__________________
Need Java help? Want to help people who do? Sit down with a cup of Java at the hotjoe forums.

Reply With Quote
  #3  
Old August 2nd, 2006, 10:09 AM
asty asty is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 89 asty User rank is Private First Class (20 - 50 Reputation Level)asty User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 15 h 28 m 46 sec
Reputation Power: 4
It Works!!

Thanks a lot.. it works wonderfully

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsUNIX Help > Problem with file on FTPing it


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway