Wget in background

Discussion in 'Site & Server Administration' started by filma, Jul 31, 2008.

  1. #1
    Well I was wondering, I was experimenting and I put this in SSH (Putty) :
    I have never tried to use wget in the background, nor have I tried to put multiple urls in at the same time. I'm still fairly new to using a dedicated server and I wanted to know if there's a way to see if my server is actually doing anything :p , I have no idea ! I closed Putty (That shouldn't effect anything as I put -bq in with the wget function in) but how can I know if my server is going anything :eek:

    Thanks for your assistance ^^
     
    filma, Jul 31, 2008 IP
  2. jayshah

    jayshah Peon

    Messages:
    1,126
    Likes Received:
    68
    Best Answers:
    1
    Trophy Points:
    0
    #2
    Use screen:

    Install it:
    yum -y install screen
    Code (markup):
    Run your program in it:
    screen
    [ You'll now get a shell, run your commands as normal ]
    
    Code (markup):
    To get out of the "screen" (think of it as a window), press CTRL+A then d , you'll see [detached] appear. To re-attach, use:
    screen -r
    Code (markup):
    Hope that helps :)

    Jay
     
    jayshah, Jul 31, 2008 IP
  3. boltok

    boltok Active Member

    Messages:
    257
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    78
    #3
    The "-q" switch causes wget to suppress its output. I'd suggest you run it without this first. Also, AFAIK it can only fetch one url at a time. May want to put multiple wgets in a script.

    You can view the output at a later time, either by running it inside screen, as jayshah suggested, or by redirecting the output to a log file.

    wget -b 'url1' >> my_wget_log
    wget -b 'url2' >> my_wget_log
    wget -b 'url3' >> my_wget_log
    Code (markup):
     
    boltok, Jul 31, 2008 IP
  4. zacharooni

    zacharooni Well-Known Member

    Messages:
    346
    Likes Received:
    20
    Best Answers:
    4
    Trophy Points:
    120
    #4
    wget -q url1 &>/dev/null &
     
    zacharooni, Jul 31, 2008 IP
  5. jayshah

    jayshah Peon

    Messages:
    1,126
    Likes Received:
    68
    Best Answers:
    1
    Trophy Points:
    0
    #5
    The OP may want to see the output.

    Jay
     
    jayshah, Aug 1, 2008 IP