Problem while Transferring files to UNIX server


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Problem while Transferring files to UNIX server
# 1  
Old 12-31-2009
Problem while Transferring files to UNIX server

Hi

When I m transferring my file to UNIX server using filezilla , after every line in a file ^M is shown.

Because of this ^M I cannot execute my file/scripts
Why so ???

Any suggestions...
# 2  
Old 12-31-2009
what is the transfer mode?

select that as binary mode for transfer or you will have to strip the control characters ( ^M ) at the destination
# 3  
Old 12-31-2009
I think you mean vice versa, no? : select ascii transfer mode, not binary.
# 4  
Old 12-31-2009
Hello

I ve tried it with both the modes i.e Binary as well as ASCII

^M is still there

I can remove it manually then my file/script is working ... However few files have more than 10000 lines. In such cases ,I cannot do it manually ...

Any help ???
# 5  
Old 12-31-2009
Hi, you can use:

Code:
tr -d '\r' < dosfile > unixfile

or check out dos2unix if it is available on your system.

I wonder why it isn't working with ftp. Did you transfer a zipped file?
# 6  
Old 12-31-2009
try using the command which will move the Control characters..
sed 's/.$//' oldfilename >newfilename .

Hope this should work.
# 7  
Old 12-31-2009
Thanks Everyone !!! SmilieSmilieSmilieSmilie

udhayashankar solution worked for me...SmilieSmilie

Scrutinizer : I m trying to FTP simple DAT file. I don't know what is the exact reason behind it coz sometimes these characters(^M) appears and sometimes not after successful transfer.Smilie

HAPPY NEW YEAR TO ALL THE USERS OF UNIX.COMSmilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Transferring a file from one UNIX server to another

Hi, Is there a way to transfer a file from one unix server from another without entering the login credentials. I know scp and other commands but it prompts the username/password. However in my script i have a file, who i need to send to another unix server where the content of that file will... (4 Replies)
Discussion started by: gopajitmalakar
4 Replies

2. UNIX for Dummies Questions & Answers

Transferring files from one linux server into another

Hello , I want to transfer files from one linux server into another , I got it working using SCP command , but I have to type in password for each and every file . All the remote severs have the same password , so is there a way that I can transfer all these files by typing my password only once ? (5 Replies)
Discussion started by: RaviTej
5 Replies

3. Shell Programming and Scripting

Transferring files from Unix to Windows server

Hi All, I have to establish as connectivity from Unix server(Solaris) to Windows machine and transfer files. We use public key Private key pair to authenticate from Unix to Unix connectivity to transfer the file. How to establish the sFTP connection from Unix to Windows and transfer the... (1 Reply)
Discussion started by: koti_rama
1 Replies

4. Programming

Problem with Perl script after moving from a Windows/Apache Server to a UNIX server.

I have a Perl script that worked fine before moving it to justhost.com. It was on a Windows/Apache server. Just host is using UNIX. Other Perl scripts on other sites that were also moved work fine so I know Perl is functioning. The script is called cwrmail.pl and is located in my cgi-bin. When I... (9 Replies)
Discussion started by: BigBobbyB
9 Replies

5. Shell Programming and Scripting

Find and delete files and folders which are n days older from one unix server to another unix server

Hi All, Let me know how can i find and delete files from one unix server to another unix server which are 'N' days older. Please note that I need to delete files on remote unix server.So, probably i will need to use sftp, but question is how can i identify files and folders which are 'N'... (2 Replies)
Discussion started by: sachinkl
2 Replies

6. Shell Programming and Scripting

script for to take files from FTP server to UNIX server and Unzipped that files

script for to take files from FTP server to UNIX server and Unzipped that files (1 Reply)
Discussion started by: sunilamarnadh
1 Replies

7. Shell Programming and Scripting

Transferring file from Windows server...

Hi, I want to transfer html files from windows server to unix server. Those files also have to be assigned proper permissions. Can u people suggest any ideas for this scenario? Regards, http://www.unix.com/images/smilies/thumb.gifSanthosh (1 Reply)
Discussion started by: Santhosh_Ind
1 Replies

8. AIX

Transferring files from one AIX server to another AIX server in binary mode

Hi, I am a newbie to AIX. We have 2 AIX5.3 servers in our environment, I need to transfer some files in Binary mode from one server to another and some files in ASCII mode from one server to another server. Could you please help me as to how I need to do that? Thanks, Rakesh (4 Replies)
Discussion started by: rakeshc.apps
4 Replies

9. UNIX for Dummies Questions & Answers

Transferring files between Windows and UNIX(AIX)

How do I transfer Plain Text and/or BMP image files between my WindowsXP PC and my AIX 4.1 PowerPC? I have no network or USB options, just a Floppy disk drive and a CD drive on each machine. Is it possible at all? Any help would be gratefully received:) (11 Replies)
Discussion started by: Pennant Man
11 Replies

10. Filesystems, Disks and Memory

Unix Sco Open Server, Windows Computers Problem Access Unix Shared Files Help!!!!!

Hello Moto I hope someone can help We's here at work, have a unix box with sco openserver 5 on it, so it has a nice gui interface.. and also a fair few windows computers.. a system admin guy b4 me, has set up a user called neil, which can, when u try to access the unix box using windows... (2 Replies)
Discussion started by: haggo
2 Replies
Login or Register to Ask a Question