LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 09-01-2004, 03:46 PM   #1
abboq
LQ Newbie
 
Registered: Sep 2003
Posts: 2

Rep: Reputation: 0
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.
 
Old 09-01-2004, 04:00 PM   #2
keegan
Member
 
Registered: Jan 2004
Distribution: Redhat WS and VectorLinux
Posts: 41

Rep: Reputation: 15
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
 
Old 09-01-2004, 04:03 PM   #3
mikedeatworld
Member
 
Registered: Nov 2003
Location: Farmington Michigan
Distribution: UBUNTU - Slackware - SuSE 9.1 - Knoppix - Fedora
Posts: 828

Rep: Reputation: 30
Try

"command"& --without quotes
 
Old 09-01-2004, 04:28 PM   #4
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,156

Rep: Reputation: 327Reputation: 327Reputation: 327Reputation: 327
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.
 
Old 09-01-2004, 05:16 PM   #5
Salpula
Member
 
Registered: Feb 2004
Location: Philadelphia, PA
Distribution: FC3 i386 & PPC
Posts: 36

Rep: Reputation: 15
Lightbulb 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. . .

Last edited by Salpula; 09-01-2004 at 05:19 PM.
 
Old 09-01-2004, 06:58 PM   #6
mikedeatworld
Member
 
Registered: Nov 2003
Location: Farmington Michigan
Distribution: UBUNTU - Slackware - SuSE 9.1 - Knoppix - Fedora
Posts: 828

Rep: Reputation: 30
true...my bad
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
HELP: running process in bg and logout and persist... woes :S kevingpo Fedora 1 09-09-2005 02:10 AM
running in background hangs on shell logout pfaendtner Linux - Newbie 5 03-25-2005 11:34 AM
Keeping a process running after disconnect steyr Linux - General 2 02-25-2004 07:03 AM
keeping volume settings on logout rdanda Slackware 1 04-12-2003 03:32 PM
How to determine whether a PROCESS is running, by a SHELL program? yuzuohong Linux - General 4 01-21-2003 09:41 PM


All times are GMT -5. The time now is 06:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration