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

3 little things in Linux 4.10 that will make a big difference

Linux never sleeps. Linus Torvalds is already hard at work pulling together changes for the next version of the kernel (4.11). But with Linux 4.10 now out, three groups of changes are worth paying close attention to because they improve performance and enable feature sets that weren’t possible before on Linux. Here’s a rundown of those changes to 4.10 and what they likely will mean for you, your cloud providers, and your Linux applications. Read more

SODIMM-style module runs Linux on VIA’s 1GHz Cortex-A9 SoC

VIA unveiled an SODIMM-style COM based on its Cortex-A9 WM8850 SoC, with 512MB RAM and 8GB eMMC, plus Ethernet, CSI, graphics, USB, and serial ports. The 68.6 x 43mm “SOM-6X50” computer-on-module appears to be VIA’s second-ever ARM COM. Back in Sept. 2015, the company released a 70 x 70mm Qseven form factor QSM-8Q60 COM, based on a 1GHz NXP DualLite SoC. Read more

Today in Techrights

today's leftovers

  • LinuXatUSIL – Previas 2 for #LinuxPlaya
    Damian from GNOME Argentina explained us some code based on this tutorial and the widgets in Glade were presented.
  • RancherOS v0.8.0 released! [Ed: and a bugfix release, 0.8.1, out today]
    RancherOS v0.8.0 is now available! This release has taken a bit more time than prior versions, as we’ve been laying more groundwork to allow us to do much faster updates, and to release more often.
  • The Technicals For Red Hat, Inc. (RHT) Tell An Interesting Tale
  • Ubuntu 17.04 Beta 1 Released | New Features And Download
    Ubuntu 17.04 Zesty Zapus Beta 1 release is finally here. If you’re interested, you can go ahead and download the ISO images of the participating flavors, which are, Lubuntu, Kubuntu, Xubuntu, Ubuntu Budgie, Ubuntu GNOME, Ubuntu Kylin, and Ubuntu Studio. Powered by Linux kernel 4.10, these releases feature the latest stable versions of their respective desktop environments. This release will be followed by the Final Beta release on March 23 and final release on April 13.
  • Ubuntu 17.04 Beta 1 Now Available to Download
    The first beta releases in the Ubuntu 17.04 development cycle are ready for testing, with Xubuntu, Ubuntu GNOME and Ubuntu Budgie among the flavors taking part.