Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

wget question

  • 09-01-2008 05:16PM
    #1
    Registered Users, Registered Users 2 Posts: 1,231 ✭✭✭


    Hey guys,

    I have a ubuntu server at home in my house and I can ssh from work to it.

    I used the command wget url to download a very large iso file. The problem is, I'm going to leave work in an hour and it won't have finished downloading. Is there a way for me to wget a file and then logout but my machine at home will continue to download the file?

    Thanks,
    Steve


Comments

  • Closed Accounts Posts: 6,151 ✭✭✭Thomas_S_Hunterson


    use the nohup command

    Basically
    nohup wget [fileurl] &

    The & backgrounds the process automatically


  • Registered Users, Registered Users 2 Posts: 1,231 ✭✭✭stereo_steve


    ok thanks!

    Also I presume there is nothing I can do now? wget is running. I would have to type ctrl c to get to a command line.

    Steve


  • Closed Accounts Posts: 6,151 ✭✭✭Thomas_S_Hunterson


    ok thanks!

    Also I presume there is nothing I can do now? wget is running. I would have to type ctrl c to get to a command line.

    Steve

    If you hit [Ctrl][Z] You can get a command line while the process is running.

    Then use the bg command to background the process.

    I'm not sure how this will react when you log out though, sorry I cant be more help. But for your future reference, use nohup to make a process immune to hang-ups/disconnects/logouts

    Someone else here might know how to apply a nohup retrospectively.


  • Registered Users, Registered Users 2 Posts: 1,231 ✭✭✭stereo_steve


    Thanks for your help. I'll know for the future


  • Closed Accounts Posts: 669 ✭✭✭pid()


    you could also use a screen session.


  • Advertisement
  • Closed Accounts Posts: 1,462 ✭✭✭bushy...


    You can kill a wget session to change the way it was running and make it pick up where it left off with

    wget -c URL_OF_WHATEVER_YOU_WERE DOWNLOADING

    to do what you originally asked , start wget like this and you can log out :

    wget -b URL_OF_WHATEVER_YOU_WERE DOWNLOADING

    It will go into the background and write its progress to a file called wget.log , you can log back in again and see its progress with :

    tail -f wget.log


Advertisement