Jump to content

How should this command look? [solved]


Recommended Posts

I have a slow dialup connection and I do most of my downloading of large files at night. What would the the command line look like for dounloading Mozilla-thunderbird 1.5, mozilla- firefox 1.5 and say gimp 2.3 and then turn the computer off after all downloads are finished.

 

many thanks maparus

Link to comment
Share on other sites

wget <<url for blah>> && wget <<url for blah>> && wget <<url for blah>> && halt

or

wget $(urpmq --sources mozilla-thunderbird) && wget $(urpmq --sources mozilla-firefox) && halt

 

&& means to wait for successful completion of previous command before executing. Just & means it can start immediately after the previous one starts.

There are also GUI download accelerators that have the option to run certain commands when all downloads finish.

Edited by Steve Scrimpshire
Link to comment
Share on other sites

That's cool! :thumbs:

I was about to say that it didn't work for me, it just gave a "file not found" error, but then I checked and sure enough the 2005 repositories have been removed from my urpmi server! So I changed my urpmi to a different server and then it works great!

(I didn't try the 'halt' bit, but got two tiny doc rpms and then did && cal, which worked). Another trick to go in the bag! :)

 

Just two things to note - firstly you need a --sources on the second urpmq, and secondly if for some reason one of the wgets fails, then it won't get to the halt bit. So if something goes wrong, the computer will stay on all night.

Link to comment
Share on other sites

Just two things to note - firstly you need a --sources on the second urpmq, and secondly if for some reason one of the wgets fails, then it won't get to the halt bit. So if something goes wrong, the computer will stay on all night.

 

Fixed. And, yes, if something goes wrong, it won't get to the 'halt'. One would actually have to write a script to handle errors and then halt, in that case.

Edited by Steve Scrimpshire
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...