Is an excellent and sophisticated file transfer command line tool which helps the administrator to work similar in the bash command prompt. Lftp bundled with lot of features, i have listed some of them.

  • Multiple protocol support (FTP, HTTP, FISH, SFTP, HTTPS and FTPS protocols).
    Supports IPv6 for both FTP and HTTP protocols.
    Scheduling downloads from command prompt.
    Easy Mirroring.
    Uploading and downloading directories.
    Assigning separate slots for multiple ftp sites.
    Queues the process/downloads.
    FXP via command line.
    Can work with scripts.
    Bookmarking the download pages.

Installing LFTP

Installation can be done either via source or rpm (source for lftp can be found here )

Lftp rpm can be download here

Working with LFTP

There are multiple options available with this tool but i have listed only few of them below, try checking the docs links below to read the full options.

To start with the lftp, simply use and type “exit” to logout/exit from the lftp shell.

  • # lftp -u username,password ftp.yourdomainname.com

To access an anon ftp site (say for example : ftp.kernel.org)

  • # lftp ftp.kernel.org

A sample working interface below

Lftp Interface

Below we download the magnificent lsof program that lies in waiting as a package on an OpenBSD server:

  • # lftp -c ‘open -e “mget lsof*” ftp.openbsd.org/pub/OpenBSD/3.7/packages/i386’

All the lsftp command history use to store in ~/.lftp/cwd_history just run ‘ history ‘ from the lftp shell to recall your command history.

From the shell you can view or edit the bookmarks file:

  • # lftp -c bookmark list|edit

You can also schedule the downloads using the at command.

  • # lftp -c ‘at 02:00 — open -e “get slackware-10.2-install-d1.iso” slacksite’ &

For FXP from the shell prompt we can use this form:

  • # lftp -c ‘open -e “mirror <server-A_dir_path> <server-B_url>” <server-A_site>’

Another excellent features is the slot(switch between connections). The first slot command applies to this initial connection. After that, slot commands apply to subsequent connections. A sample screen-caps below.

Lftp Slot

Useful Links :

Lftp home page

Lftp Docs