D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Backgrounding processes (was Re: [LUG] Download script)

 

Quoting David:

The easy solution to this problem is to use 
'screen'. Screen is a fantastically useful program - it allows you to 
have a logged in session even when you disconnect from your machine. 
You can also, say, log in from work, connect to your session, do stuff, 
disconnect and then reconnect to the same session from home.

If you're running something non-interactive like wget, screen seems rather like
overkill.

I'd suggest looking into using nohup instead. e.g.:

nohup wget http://my.url/image.iso &

All of the output of wget will get redirected to a file called nohup.out.

The only issue with backgrounding processes in this way (you may well find this
with screen too) is that when you're connected via openssh, when you log out the
connection won't get ended cleanly unless you redirect stdin, like so:

nohup wget http://my.url/image.iso < /dev/null &

Alex.

--
The Mailing List for the Devon & Cornwall LUG
Mail majordomo@xxxxxxxxxxxx with "unsubscribe list" in the
message body to unsubscribe.