ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
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.
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.
I suggest you to look at commands you actually send to the server and at server's reply with the help of `ngrep' utility.
The problem might be a lost of synchonization between FTP client and server caused by slow network connection or smth like. For example when you say 'USER <username>' ftp server should respond:
Code:
331 Password required for <username>.
and if you send 'PASS <passwd>' before you caught 331 reply then FTP server will wait your password forever (or until timeout). Theoretically
If this is the case, you may use `sleep N' bash command between FTP commands or use more complicated strategy of waiting for server replies (see for example `email' script at http://tiocu.svn.sourceforge.net/vie...=2&view=markup).
Hope, this is unuseful for you and the problem can be solved in less complicated way!
The benefit you get from wget is the simplicity of use. wget uses a single command line, and then gets the stuff. ftp requires that you emulate a person typing in a series of commands.
true, wget is better but often in a working environment you are stuck with ftp.
jiliiagre is right, << documents are no good.
ftp is a pain to automate, i've tried extensively before.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.