Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 11-30-2004, 12:56 PM   #1
Raptor Ramjet
Registered: Apr 2003
Location: Under a rock
Distribution: Slackware "current" - Praise "Bob" !!!!
Posts: 92

Rep: Reputation: 15
running asynchronous jobs


I would like to be able to ssh into my linux box, issue a "wget" command to run asynchronously, then close the ssh session. i.e. I would like to issue the "wget" command such that it continues to run to completion after I've closed the ssh session to my box.

Now so far I've looked into using the "&" suffix on my "wget" command to try to run it in the background but this didn't seem to work.

So if anyone could confirm that this is possible ? and give me some pointers as to how to do it ? I'd be most grateful.

n.b. I realise I could do something similar by creating a scrtipt and running it from a cron job but I'd like something quick and dirty that I can do from an ssh session.

That way I can use my lunchtimes at work to set my home server downloading some fresh apps ready for me to try when I get home

Old 11-30-2004, 01:44 PM   #2
LQ Guru
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 252Reputation: 252Reputation: 252
Start a screen session... then you can just save the whole terminal session or connect to it later at all times.. etc.

man screen
Old 11-30-2004, 08:46 PM   #3
Registered: Aug 2004
Posts: 130

Rep: Reputation: 15
After you exited the ssh session, wget will run in background automatically, if it detects that can't output log to screen, it will redirect output to a log file.
Old 12-01-2004, 03:49 AM   #4
Raptor Ramjet
Registered: Apr 2003
Location: Under a rock
Distribution: Slackware "current" - Praise "Bob" !!!!
Posts: 92

Original Poster
Rep: Reputation: 15
Cheers for the replies !

However having done a quick "man screen" this looks to be a most "excellent thing" (tm) so I'll give it a try later on today (when I'm at work).

And I'll also try using "wget url &" again later today as it definitely didn't work last time. Mind you the download may have got broken or something so I asked the question to confirm that this was the right thing to do (no point doing loads of experiments if I was "barking up the wrong tree")

Thanks again for the replies.


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 On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
keep jobs running server-solution Linux - Software 2 09-15-2005 05:49 AM
running jobs on the background feetyouwell Linux - Software 3 08-02-2005 11:36 AM
crontab jobs aren't running mdm_linux Linux - General 4 05-30-2005 01:27 PM
cron jobs not running scarr3d Linux - Software 7 05-25-2004 05:21 PM
running jobs in background in bash markhod Linux - Software 2 10-08-2003 08:11 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:09 PM.

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