LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Keeping a process running after shell logout (https://www.linuxquestions.org/questions/linux-software-2/keeping-a-process-running-after-shell-logout-225360/)

abboq 09-01-2004 02:46 PM

Keeping a process running after shell logout
 
Is it possible to start a process and keep it running even after logging out of a remote shell? I'd like to login remotely, start an FTP download onto the machine, and then log out remotely, with the file transfer continuing. Is there a way to do this?

Thanks for any help you can provide.

keegan 09-01-2004 03:00 PM

Im not sure if screen works with ftp, but, for example, if you wanted to run a python script called 'myscript.py' you would use:

screen python myscript.py

it would run, the once you want to logout, use

ctrl+a ctrl+d

to get out of it.

man screen

mikedeatworld 09-01-2004 03:03 PM

Try

"command"& --without quotes

btmiller 09-01-2004 03:28 PM

The & will put it into the background, but it still dies when you log out, to stop that, use:

nohup <command> &

This will put the process in the background and tell it to ignore the terminal hangup when you log out.

Salpula 09-01-2004 04:16 PM

Try this
 
I THINK that if you put an ampersand (&) at the end it puts it in the background, so you can at least continue using the shell while its running, I am not positive if it will continue to run in the background after you log out.

EDIT: I should have refreshed the thread before replying. . .

mikedeatworld 09-01-2004 05:58 PM

true...my bad


All times are GMT -5. The time now is 11:28 AM.