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

Fedora 23: Python 3 Default Approved; Netizen Spin Rejected

All self-contained changes were approved this week except for the io.js change and the proposed Netizen spin. The Fedora Netizen spin was to be about: "Fedora Netizen is an open source operating system for enabling internet citizens to engage with online services and communities...The philosophy for Netizen closely relates to Maslow's Hierarchy of Needs by establishing three primary software package levels in a hierarchical model. The first and lowest software package level addresses the need for Netizen Privacy in the areas of personal privacy, informational privacy, and communication privacy. After Netizen Privacy, the second software package level addresses the need for Netizen Security in the areas of data security, local security, and network security. After Netizen Security, the third software package level addresses the need for Netizen Engagement in the areas of publishing, education, and social engagement. Future Netizen software package levels will address analytics, awareness, design, develop, and others." Read more

Q&A: Zipcar founder Robin Chase on open source and the collaboration economy

Robin Chase is a transportation entrepreneur known for founding the transportation related companies such as Zipcar, Buzzcar and Veniam. She wears many hats and is an inspiration to women all around the globe. She is also a strong supporter of Open Source and Open Collaborative technologies. She recently authored a book called Peers Inc: How People and Platforms Are Inventing the Collaborative Economy and Reinventing Capitalism. Chase will be delivering a keynote at the upcoming LinuxCon event. Read more

Learn OpenStack with Linux Foundation Instructor Tim Serewicz

When Tim Serewicz started teaching Linux system administration classes at IBM, his boss thought Linux was “just a fad." Serewicz has since made a full-time career out of teaching admins the latest technologies in the ever-evolving and growing Linux ecosystem. He has taught at IBM, Sun Microsystems, Oracle, and Red Hat and now teaches OpenStack and Linux performance and tuning courses for Linux Foundation Training. Read more

BQ Aquaris E5: An Ubuntu Edition Phone that severely disappoints

I can't begin to tell you how saddened I am that I've had to write this. I wanted the Ubuntu Phone to completely blow me away and pull me from the Android platform with ease and grace. Instead, it solidified my opinion that jumping into the ring with Android and Apple is a fight that most aren't really ready to take up. Please, Canonical, go back to the drawing board and return with a UI that makes sense... or simply return all of your focus on what you do best and leave the mobile platform to Google and Apple. Read more