LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   ftp-download as background process? (https://www.linuxquestions.org/questions/programming-9/ftp-download-as-background-process-7595/)

Steave 10-16-2001 11:11 AM

ftp-download as background process?
 
Hi everybody!

Does anyone know a way to achieve the following:

I want to download a file from a friends computer. Since this will take somewhat longer ;) I wondered if I could just tell my router to download the file, so my workstation doesn't need to run.
The only way I can work on the router is with ssh. So I can't just open an ftp-session and let it run forever, since it will be killed when I shut down my workstation and as such the ssh-session is stopped. I would need to have it run nohup. But then I can't do all the interactive input like loggin in and requesting the file by hand.
How do I automate this?

Thanx in advance! Steave.

webtoe 10-16-2001 03:06 PM

search
 
have you searched the forum?
im sure that there has been tons of these sort of questions asked before (keeping a program alive from a telnet/ssh prompt after logging off)

Alex

lensmanseye 10-17-2001 02:59 AM

The wget program (which is included in the Mandrake distro, so I would imagine comes with the SuSE one) is a wonderful download program.

It handles ftp and http programs and can be left in the background while it does it stuff. Furthermore, if you have it as a foreground activity when your ssh-session is terminated (say by an overzealous ISP), the download will carry on until it gets all of it.

The program can also handle recursive downloads as well.

The only problem is that, for non-anonymous ftp access, it does require your username and password to be passed to the command prompt.

dorward 10-17-2001 04:58 AM

Use Screen!
 
Use screen (man screen)

Code:

ssh ...
screen
ftp ...
Ctrl+A, Ctrl+D
exit

Then at a later stage

Code:

ssh ...
screen -x

and you should find your session with the ftp client still running (assuming that the download didn't finish a while ago and the remote server closed the connection, in which case you will have the file available to scp).


All times are GMT -5. The time now is 09:20 AM.