General
cancel
Showing results for 
Search instead for 
Did you mean: 

need ftp client started from shell specially for transfers from linux to windows

SOLVED
Go to solution
'chris'
Super Advisor

need ftp client started from shell specially for transfers from linux to windows

hi

need ftp client started from shell specially for transfers csv (text) files from linux to windows, something like LLNL XFTP, but without GUI and using only from shell Konsole.

in my case XFTP is only a ftp client, that transfer all files without getting corrupt

I've tried ftp from shell, gftp, lftp,
to convert unix2dos or iconv as well or transfer binary or ascii .
files after transfer are always currupt.
only LLNL XFTP transfers each time perfectly.

http://www.llnl.gov/ia/xftp.html
5 REPLIES
Laurie Gellatly
Honored Contributor

Re: need ftp client started from shell specially for transfers from linux to windows

Hi,
Are you trying to transfer between Linux
and Windows but controlled from a 3rd machine?
Is that the issue?

...Laurie :{)
If you're not using OverTime, you're doing overtime!
Thomas Bianco
Honored Contributor

Re: need ftp client started from shell specially for transfers from linux to windows

how do you mean corrupt? windows and linux handle line feeds differently, and gennerally you need to run "conv" against any files you wish to use on the other platform. conv -d will force dos-style.

dos (and by extension, windows) expects a LF then a CR (or reverse, i forget)
linux treats the latter (whichever that is) as both and the former as a non-printing char.
There have been Innumerable people who have helped me. Of course, I've managed to piss most of them off.
Jerome Henry
Honored Contributor

Re: need ftp client started from shell specially for transfers from linux to windows

Or are they corrupted because win expects binary while you get ascii ?
You can lean only on what resists you...
Jan Sladky
Trusted Contributor

Re: need ftp client started from shell specially for transfers from linux to windows

hi,

how is the file corrupted ? If you are transfering txt file via ASCII mode, there is no reason for corruption and also ftp client or server doesn't take any role.

check, if the orig. file on linux has no windows nonprintable characters, by:

cat -v file

br Jan

GSM, Intelligent Networks, UNIX
unknown_6
Advisor
Solution

Re: need ftp client started from shell specially for transfers from linux to windows

Greetings,
This (for me anyway) is an easy answer. ;)
Firstly, I feel as I should mention that if
these boxes are connected to the internet,
you should _seriously_ consider using Sftp
(SecureFileTransferProtocol) or SCP (Secure
CopyProtocol). Why? Well, with all the ppl
scanning ports and logging activities on the
Internet. This is a _real_ threat to your own
security. Using the (Secure way) isn't any
harder but _is_ alot more secure (safer).
But to answer your question...
If you're using a plain ftp client it's easy.
First, is the file your downloading in Text,
or Binary format? If it's in Text, at the
ftp prompt, type A, then enter. A is short
for ASCII. If, on the other hand, the file
you want to download is in Binary format,
at the ftp prompt, type BIN. As the name
suggests, it means use BINARY format for
transfer. You should see a response similar
to: TYPE set to BINARY mode. I have a large
network of Win2k servers, *BSD servers, and
Macintosh (Mac classic) boxes. Using the
technique above gives me no troubles with
any of the machines. Altho I use sftp you
will have no conversion troubles with either
way if you use the way I sugested. The
transfer will be done in the correct format
for you. Dos doesn't handle Mac/ UNIX line
feeds well. So, if you're sending text in
either of those formats, altho ASCII, the
unix2dos script will fix them for use in
Notepad, or whatever. Well, have fun!

Chris out...