download magnet links with rtorrent from command line

check rtorrent version

Please note that you need a recent version of rtorrent for magnet links to work.

rtorrent version used in these examples:

sudo dpkg -l rtorrent
ii  rtorrent                    0.8.9-2                     ncurses BitTorrent client based on LibTorrent from rakshasa

Prepare rtorrent directory structure

The following structure will allow you to keep files in order.

mkdir ~/bittorrent
mkdir ~/bittorrent/incoming
mkdir ~/bittorrent/pending
mkdir ~/bittorrent/watch

Later we will configure ~/rtorrent.rc to automatically detect new torrent files added in the directory ~/bittorrent/watch

Enlaces Patrocinados

Use following options in file ~/.rtorrent.rc

# This is an example resource file for rTorrent. Copy to
# ~/.rtorrent.rc and enable/modify the options as needed. Remember to
# uncomment the options you wish to enable.

# Maximum number of simultanious uploads per torrent.
max_uploads = 5
# Global upload and download rate in KiB. "0" for unlimited.
download_rate = 0
upload_rate = 10
 
# Default directory to save the downloaded torrents.
directory = ./incoming
 
# Watch a directory for new torrents, and stop those that have been
# deleted.
schedule = watch_directory,5,5,load_start=./watch/*.torrent
#schedule = untied_directory,5,5,stop_untied=

change working directory into ~/bittorrent

To use the directory structure we created and configured, we should “cd ~/bitorrent”

( or we can use full path directories in the ~/.rtorrent.rc )

cd ~/bittorrent
rtorrent

download magnet link bash script

You can use following bash script to download a magnet link.

#!/bin/bash

## usage:  ./download_magnet_url.sh  "magnet_link"
## magnet link shoul be enclosed in quotes.

cd ./watch    # set your watch directory here
[[ "$1" =~ xt=urn:btih:([^&/]+) ]] || exit;
echo "d10:magnet-uri${#1}:${1}e" > "meta-${BASH_REMATCH[1]}.torrent"

use the script as following

replace “magnet_link” with the real link.

cd ~/bittorrent
./download_magnet_url.sh  "magnet_link"

Upgrade from Windows 8 – Close Windows, Open Doors

Microsoft has shelled out a mind-boggling estimated $1.8* billion to convince the public that it needs Windows 8. Why the record-breaking marketing deluge? Because a slick ad campaign is Microsoft’s best shot at hiding what Windows 8 really is; a faulty product that restricts your freedom, invades your privacy, and controls your data.

Microsoft wants to keep you locked in to Windows so that it can take your money, your personal data, and your user freedom. They don’t want you to know that you have a choice of better operating systems; operating systems that respect your freedom. There are tons of free “as in freedom” software operating systems that you can download and install at no cost. And when they’re improved, you can choose whether or not you want to upgrade, without a corporation breathing down your neck.

Here’s some of the Windows 8 “features” Microsoft won’t tell you about:

Upgrade from Windows 8 - Close Windows, Open Doors

Upgrade from Windows 8 – Close Windows, Open Doors

Install heartbeat 3 on GNU/Linux CentOS 6.3

Heartbeat install – config – operation

Heartbeat installation

Note that the same procedure can be followed to install Heartbeat on DB server 2 (192.168.2.52).

Heartbeat can be installed from EPEL repository

following command install EPEL:

rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-7.noarch.rpm

then Install Heartbeat

yum --enablerepo=epel install heartbeat

Continue reading