Language Selection

English French German Italian Portuguese Spanish

Timed downloads

Filed under
Software
Ubuntu
HowTos

For quite some time I've been looking for a tool to download a list of files (stored in a text file) at a certain time and, if possible, shutdown after completion. Unfortunately there is no know Linux-application that can perform these tasks. Although I recently found one that comes very close. It's called Receiver and you can find it here: http://www.halogenware.com/software/retriever.html. At first sight it suited all my needs, but it failed in downloading files hosted by RapidShare.

Then I got the idea to combine the use of Wget, a terminal download manager, with that of a scheduler. Is used this one: http://www.alarm-clock.pl. Alarm Clock is quite handy because it let's you to perform shell scripts that get initiated at a chosen time. Below you will find a guide how I set it up.

1.Install Alarm Clock (it's in the Ubuntu-repository). Wget is installed by default.

2.If you also own a RapidShare-account, you need to download a cookie to work with Wget by opening a terminal window en type the following. (You need to fill in, of course, your username and password. The cookie will be saved in your home directory under ~/.cookies. If you don't own an account you can skip this step.)

wget \
--save-cookies ~/.cookies/rapidshare \
--post-data "login=USERNAME&password=PASSWORD" \
-O - \
https://ssl.rapidshare.com/cgi-bin/premiumzone.cgi \
> /dev/null

3.You need to change the permissions of the shutdown command, otherwise you will have to provide you password. You can do this by typing this into a terminal.

sudo chmod u+s /sbin/shutdown

4.Open Alarm Clock and choose Birthday & Templates under the Edit menu and choose to enter a new template. I named it Downloads.

5.Fill in the necessary standard settings (they quite speak for themselves so I won't elaborate on this).

6.Then, under the Notifications tab you mark Run command and click on the Preferences button next to it.

7.In the next dialog: choose to run a shell script and type the following in the box below.

cd ~/Downloads
wget --input-file=down.txt --load-cookies=~/.cookies/rapidshare
shutdown -P now

You need to know that in this example I use the file down.txt to store the links I wish to download and ~/Downloads to story everything in. If you prefer other settings, just change the arguments accordingly. Quite obviously you don't have to mention the cookie argument if you don't have one.

That's it. Now only fill a text files with download links and create a new alarm using the template!

By Steven Van Landeghem

More in Tux Machines

Community chest: Storage firms need to pay open-source debts

Linux and *BSD have completely changed the storage market. They are the core of so many storage products, allowing startups and established vendors alike to bring new products to the market more rapidly than previously possible. Almost every vendor I talk to these days has built their system on top of these and then there are the number of vendors who are using Samba implementations for their NAS functionality. Sometimes they move on from Samba but almost all version 1 NAS boxen are built on top of it. Read more

Black Lab SDK 1.8 released

QT Creator - for QT 5 Gambas 3 - Visual Basic for Linux Ubuntu Quickly - Quick and dirty development tool for python emacs and Xemacs - Advanced Text Editor Anjuta and Glade - C++ RAD development tool for GTK Netbeans - Java development environment GNAT-GPS - IDE for the following programming languages. Ada, C, JavaScript, Pascal and Python Idle - IDE for Python Scite - Text Editor Read more

Did Red Hat’s CTO Walk – Or Was He Pushed?

He went on to say that some within Red Hat speculate that tensions between Stevens and Paul Cormier, Red Hat’s president of products and technologies, might be responsible, although there doesn’t appear to have been any current argument between the two. Cormier will take over Stevens’ duties until a replacement is found. Vaughan-Nichols also said that others at Red Hat had opined that Stevens might’ve left because he’d risen as high as he could within the company and with no new advancement opportunities open to him, he’d decided to move on. If this was the case, why did he leave so abruptly? Stevens had been at Red Hat for nearly ten years. If he was leaving merely because “I’ve done all I can here and it’s time to seek my fortune elsewhere,” we’d expect him to work out some kind of notice and stay on the job long enough for Red Hat to find a suitable replacement. Turning in a resignation that’s effective immediately is not the ideal way to walk out the door for the last time. It smells of burning bridges. Read more

Firefox OS Smartphones Change The Mobile Landscape Across India

The launch of two Firefox OS phones in India in the same week marks an exciting moment in Mozilla’s mission to promote openness and innovation on the Web, and an opportunity to empower millions of Indians wanting to buy their first smartphones. Firefox OS will enable users to obtain lower-cost devices that offer telephony, messaging and camera and rich capabilities like built-in social integration with Facebook and Twitter, the Firefox browser, FM radio and popular apps. Read more