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

My life in open source, and the mentors who led the way

I have been working on the Apache http server for almost 20 years now. I've written 9 books about httpd, and spoken at more than fifty conferences. I'm a member of the Apache Software Foundation, where I serve as a board member and as Executive Vice President. I am responsible for putting on ApacheCon, both in North America and Europe, which is the official conference of the ASF. Read more

Open Source Electronic Health Record Alliance Joins Open Source Initiative

The Open Source Electronic Heath Records Alliance, or OSEHRA, a non-profit community dedicated to supporting open source users, developers, service providers, and researchers engaged in advancing health information technology, has joined the Open Source Initiative's (OSI) Affiliate Membership program. OSI Affiliates are organizations committed to public support for open source software and the role the OSI plays therein. The current Affiliate membership is a who's-who of the world of open source software. Read more

How strong is peer review in open source?

An example of a standard open source peer review process begins with a software author submitting their code and documentation to their project's mailing list. It is then examined by other contributors and project managers; potential problems and improvements are discussed amongst the community and author before the changes are either accepted or rejected. GitHub uses the version control software Git to offer a streamlined system in which project managers can oversee their source code while still allowing for code review. Due to its ease of use, GitHub has become a popular host for version control and code review, with over 2,000,000 repositories uploaded to the site as of 2011. Read more

These are the new faces of Android Wear

Google has opened a section to the Play Store dedicated to serving new watch faces for Android Wear smartwatches. Until this new debut, which accompanies a significant software update for the Android Wear watches themselves, the only choices available were the standard ones preloaded by Google, a few extras provided by manufacturers like LG, and a few from grassroots fans who made their own. Now Google has an official development kit for new faces and a whole bunch of options already populating the store. You'll find some of the standouts below, in both their active and passive modes, and you can peruse the full collection of novelties in our comprehensive hands-on gallery. Read more