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

Flatpak 0.9.3 Linux App Sandboxing Framework Released with Many Builder Changes

Alex Larsson from the Flatpak team announces the release and immediate availability of the third maintenance update to the Flatpak 0.9 series of the open-source Linux application sandboxing and distribution framework. Read more

New CloudLinux 7 Beta Linux Kernel Available for Testing, Two Crashes Addressed

CloudLinux's Mykola Naugolnyi announced today, April 26, 2017, the availability of a new Beta kernel for users of the CloudLinux 7 operating system series, addressing various vulnerabilities discovered lately. Read more

5 more open source companies to watch in 2017

An exciting class of startups with a focus on enterprise IT are those built on open source foundations, in some cases commercializing and adding value to an already popular open source project. We recently highlighted 5 such open source-oriented companies, and below we introduce you to 5 more. Note that this list only contains companies that have announced funding over the past year or so, and isn't intended to be an all-inclusive compilation. Without further ado… Read more

Ubuntu 17.10 (Artful Aardvark) Linux OS Is Now Officially Open for Development

Canonical's Adam Conrad announced the other day that the upcoming Ubuntu 17.10 (Artful Aardvark) operating system, due for release on October 19, 2017, is now officially open for development. Read more Also: Canonical Releases a Technology Preview of Ubuntu Server 17.04's New Installer Canonical Outs Major Kernel Update to Ubuntu 16.04 LTS, 10 Vulnerabilities Fixed Canonical Releases Snapcraft 2.29 Snap Creator Tool for Ubuntu 16.04 LTS & 17.04