Lftp has become my favourite ftp client for pulling files from my seedbox. It's lightweight, doesn't eat up all your system resources, allows for segmented downloading of files and downloads can be resumed if paused or your connection falls out half way through. It also allows for sftp connections and TAB completion which is handy for not having to type out filenames in full.
Lftp is a Command Line Interface (CLI) ftp client. Those dreaded words usually seem to scare most people away from using a program in favour of something with a flashy GUI. However I think it is always worth learning how to use CLI based programs and hopefully this guide should help some of you give it a go and see just how useful the CLI can be.
I will cover the installation of lftp on the main debian based linux distros such as ubuntu et al. seeing as they seem to be the most widely used. I will also cover the installation on Arch linux (my personal favourite at the moment) and installing on any other linux distro from the lftp source. I will not be covering any Red Hat based linux distributions as I personally cannot stand the rpm package management systems. However if there is a demand for such a section to this guide I could add it at a later date.
I will also provide a link on how to install this wonderful little program on your mac.
Installation
Linux
Ubuntu (or anything else debian/ubuntu based)
The installation on ubuntu is very straight forward. Fire up synaptic and search for lftp, install it and all its dependencies.
Or alternatively if you like to use the command line to install your programs
Code:
sudo apt-get install lftp
Arch Linux
First update your package list and system if you do not already do so on a regular basis
Then install lftp from the arch repo
That should be it.
From Source
Download the tarball from the lftp website
Code:
$ wget http://ftp.yars.free.net/pub/source/lftp/lftp-4.1.3.tar.gz
Unpack the tarball
Code:
$ tar -zxvf lftp-4.1.3.tar.gz
Change into the newly extracted directory
Configure and install the package
Code:
$ sudo make install
* if you do not have sudo on your system then issue the su command to gain super user permissions, then issue the make install command.
MAC
To install lftp on MAC you must first install mac ports or darwin ports.
The best way of installing these is to head over to their websites and follow their installation instructions for your version of OSX. (macports requires you to install Xcode first)
The installation of lftp can be done by following the guide on this website
Lftp version 4.0.2 - How to Download and Install on Mac OS X
which uses darwinports, but the installation process should be the same if using macports.
Lftp Usage
First of all we need to open up a terminal program or whatever your preferred way of getting to the CLI is.
Then we can connect to our seedbox with the following command
Code:
$ lftp -p port -u username,password ftp://site
(* port is usually 21 for normal ftp connections and 22 for sftp. If you are connecting via sftp, don't forget to change ftp:// to sftp://)
You can also leave out the password from the command and you will be asked for it upon connecting to your seedbox.
The following are some useful commands for navigating your seedbox
ls - will list the contents of your current directory
cd - will change the directory
rm file - will remove/delete a file
rmdir directory - will remove/delete a directory
Using the TAB key for autocompleting file or directory names is a very useful feature of lftp.
Lets say we are navigating to a folder where our target movie is stored. In my case on my seedbox my downloaded files are stored in a directory called data.
First we do
Followed by:
to list all the files.
For the purpose of this guide we will say we have 3 different folders displayed which each contain one film.
MovieAAABBBXXXYYY
MovieAAACCCXXXYYY
MovieAAADDDXXXYYY
As is the case with most torrented movies, the folder containing the movie has a long name with the year of the film, the ripper/encoder and other bits of information in it. To save us having to type out the whole name of the film we can use the tab key to auto-complete the file/folder name. We issue the change directory command and start typing the filename. In our example each filename has the first same three letters, so we type those and then the first unique identifying letter. So say we want to change into the MovieAAADDDXXXYYY directory. We type
Then hit the TAB key, which should auto-complete the directory name for us and display:
Code:
$ cd MovieAAADDDXXXYYY
Hit enter and we should be in the movies directory.
Again use the ls and cd commands to get to the movie file, lets say it's called Movie AAADDDXXXYYY.avi
Now we want to start a segmented download of 10 pieces of that file. To do this we use
Code:
$ pget -c -n 10 MovieAAADDDXXXYYY.avi
The -c command allows us to restart the download from the same place if there are any interruptions while downloading is taking place. The -n command indicates the number of pieces into which the download will be segmented. Which in this case is 10.
That should be it, your download should now commence in 10 segments which are joined together at the end of the download process.
If you are wanting to download multiple files then simply add each extra file you would like to download to the end of the pget command.
In the case where you have a folder which contains a movie which has already been split into multiple rar files, you would be better off using the mget command to download the directory containing the rar files.
For further commands and options check out the Man Pages for lftp here:
LFTP Man Pages
I hope that helps a few people out. If there is anything missing or better ways of doing stuff just let me know. I will try to update this little guide whenever I can.